mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-06 12:54:11 +01:00
Refactoring
This commit is contained in:
@@ -90,7 +90,7 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|||||||
|
|
||||||
void onLoaded(int fetched);
|
void onLoaded(int fetched);
|
||||||
|
|
||||||
void onError(@NonNull Throwable ex);
|
void onException(@NonNull Throwable ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
BoundaryCallbackMessages(Context context, long folder, boolean server, String query, int pageSize) {
|
BoundaryCallbackMessages(Context context, long folder, boolean server, String query, int pageSize) {
|
||||||
@@ -151,7 +151,7 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
|||||||
handler.post(new Runnable() {
|
handler.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
intf.onError(ex);
|
intf.onException(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -2725,7 +2725,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable ex) {
|
public void onException(@NonNull Throwable ex) {
|
||||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||||
if (ex instanceof IllegalStateException) {
|
if (ex instanceof IllegalStateException) {
|
||||||
Snackbar snackbar = Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG);
|
Snackbar snackbar = Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG);
|
||||||
|
|||||||
Reference in New Issue
Block a user