Skip to content

Commit ec72cd1

Browse files
author
donchenko_r
committed
remove onComplete callback for RxRequestAction
1 parent 1333236 commit ec72cd1

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

actionhandler/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
33
ext {
44
libraryVersionMajor = 1
55
libraryVersionMinor = 2
6-
libraryVersionRevision = 0
6+
libraryVersionRevision = 1
77

88
libraryVersion = libraryVersionMajor + '.' + libraryVersionMinor + '.' + libraryVersionRevision
99

actionhandler/src/main/java/com/drextended/actionhandler/action/RxRequestAction.java

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
* @param <M> The type of model which can be handled
4040
*/
4141
public abstract class RxRequestAction<RM, M> extends RequestAction<RM, M> implements Cancelable {
42+
public static final Object NO_RESULT = new Object();
43+
4244
protected CompositeDisposable mDisposable;
4345
protected boolean mUnsubscribeOnNewRequest = true;
4446

@@ -73,7 +75,6 @@ protected void onMakeRequest(final Context context, final View view, final Strin
7375
@Override
7476
public void onSuccess(RM response) {
7577
onResponseSuccess(context, view, actionType, model, response);
76-
onResponseCompleted(context, view, actionType, model);
7778
}
7879

7980
@Override
@@ -135,35 +136,4 @@ public void cancel() {
135136
@Nullable
136137
protected abstract Single<RM> getRequest(Context context, View view, String actionType, M model, @Nullable Object payload);
137138

138-
/**
139-
* Called when request observable emits "onComplete" event.
140-
* Hides progress dialog if enabled
141-
*
142-
* @param context The Context, which generally get from view by {@link View#getContext()}
143-
* @param view The view, which can be used for prepare any visual effect (like animation),
144-
* Generally it is that view which was clicked and initiated action to fire
145-
* @param actionType Type of the action which was executed.
146-
* @param oldModel The model which was used in request.
147-
*/
148-
protected void onResponseCompleted(Context context, View view, String actionType, M oldModel) {
149-
if (mShowProgressEnabled) hideProgressDialog();
150-
}
151-
152-
/**
153-
* Called on request observable emits "onNext" event.
154-
* Overrides super, so that does not hide progress dialog but calls {@link #notifyOnActionFired} here.
155-
* See {@link #onResponseCompleted(Context, View, String, Object)} for that.
156-
*
157-
* @param context The Context, which generally get from view by {@link View#getContext()}
158-
* @param view The view, which can be used for prepare any visual effect (like animation),
159-
* Generally it is that view which was clicked and initiated action to fire
160-
* @param actionType Type of the action which was executed.
161-
* @param oldModel The model which was used in request.
162-
* @param response network response
163-
*/
164-
@Override
165-
protected void onResponseSuccess(Context context, View view, String actionType, M oldModel, RM response) {
166-
// super.onResponseSuccess(context, view, actionType, oldModel, response);
167-
notifyOnActionFired(view, actionType, oldModel, response);
168-
}
169139
}

0 commit comments

Comments
 (0)