mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 22:51:02 +00:00
Revert "Use view handler for boundary callbacks"
This reverts commit d0858f3862
.
This commit is contained in:
parent
d0858f3862
commit
b072d9e9f1
3 changed files with 7 additions and 6 deletions
|
@ -85,7 +85,9 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|||
private int pageSize;
|
||||
|
||||
private IBoundaryCallbackMessages intf;
|
||||
|
||||
private Handler handler;
|
||||
|
||||
private State state;
|
||||
|
||||
private static final int SEARCH_LIMIT_DEVICE = 1000;
|
||||
|
@ -109,9 +111,9 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
void setCallback(IBoundaryCallbackMessages intf, Handler handler) {
|
||||
void setCallback(IBoundaryCallbackMessages intf) {
|
||||
this.handler = new Handler();
|
||||
this.intf = intf;
|
||||
this.handler = handler;
|
||||
this.state = new State();
|
||||
}
|
||||
|
||||
|
|
|
@ -4331,7 +4331,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
getContext(), getViewLifecycleOwner(),
|
||||
viewType, type, account, folder, thread, id, filter_archive, criteria, server);
|
||||
|
||||
vmodel.setCallback(getViewLifecycleOwner(), callback, view.getHandler());
|
||||
vmodel.setCallback(getViewLifecycleOwner(), callback);
|
||||
vmodel.setObserver(getViewLifecycleOwner(), observer);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import android.content.Context;
|
|||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Pair;
|
||||
|
||||
|
@ -517,9 +516,9 @@ public class ViewModelMessages extends ViewModel {
|
|||
this.boundary = boundary;
|
||||
}
|
||||
|
||||
void setCallback(LifecycleOwner owner, BoundaryCallbackMessages.IBoundaryCallbackMessages callback, Handler handler) {
|
||||
void setCallback(LifecycleOwner owner, BoundaryCallbackMessages.IBoundaryCallbackMessages callback) {
|
||||
if (boundary != null) {
|
||||
boundary.setCallback(callback, handler);
|
||||
boundary.setCallback(callback);
|
||||
|
||||
owner.getLifecycle().addObserver(new LifecycleObserver() {
|
||||
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
|
||||
|
|
Loading…
Reference in a new issue