1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 01:06:04 +00:00

Prevent crash

This commit is contained in:
M66B 2022-04-17 18:58:43 +02:00
parent c3a8a3893d
commit 52525cd618

View file

@ -197,13 +197,13 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
return;
}
if (intf != null)
ApplicationEx.getMainHandler().post(new Runnable() {
@Override
public void run() {
ApplicationEx.getMainHandler().post(new Runnable() {
@Override
public void run() {
if (intf != null)
intf.onLoading();
}
});
}
});
if (server)
try {
found = load_server(state);
@ -222,13 +222,13 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
} catch (final Throwable ex) {
state.error = true;
Log.e("Boundary", ex);
if (intf != null)
ApplicationEx.getMainHandler().post(new Runnable() {
@Override
public void run() {
ApplicationEx.getMainHandler().post(new Runnable() {
@Override
public void run() {
if (intf != null)
intf.onException(ex);
}
});
}
});
} finally {
state.queued--;
Log.i("Boundary queued -" + state.queued);
@ -237,15 +237,14 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
crumb.put("free", Integer.toString(Log.getFreeMemMb()));
Log.breadcrumb("Boundary done", crumb);
if (intf != null) {
final int f = found;
ApplicationEx.getMainHandler().post(new Runnable() {
@Override
public void run() {
final int f = found;
ApplicationEx.getMainHandler().post(new Runnable() {
@Override
public void run() {
if (intf != null)
intf.onLoaded(f);
}
});
}
}
});
}
}
});