Refactoring

This commit is contained in:
M66B 2019-06-13 08:10:47 +02:00
parent a7ea56b5a0
commit ff11c6a9e8
2 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
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) {
@ -151,7 +151,7 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
handler.post(new Runnable() {
@Override
public void run() {
intf.onError(ex);
intf.onException(ex);
}
});
} finally {

View File

@ -2725,7 +2725,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}
@Override
public void onError(Throwable ex) {
public void onException(@NonNull Throwable ex) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
if (ex instanceof IllegalStateException) {
Snackbar snackbar = Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG);