1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

Prevent crash

This commit is contained in:
M66B 2021-08-14 14:26:37 +02:00
parent 34df259af5
commit 52097c07c9

View file

@ -567,7 +567,7 @@ public class ViewModelMessages extends ViewModel {
if (boundary != null) { if (boundary != null) {
BoundaryCallbackMessages.State state = boundary.setCallback(callback); BoundaryCallbackMessages.State state = boundary.setCallback(callback);
PagedList<TupleMessageEx> plist = list.getValue(); PagedList<TupleMessageEx> plist = list.getValue();
if (plist != null) if (plist != null && plist.size() > 0)
plist.loadAround(0); plist.loadAround(0);
owner.getLifecycle().addObserver(new LifecycleObserver() { owner.getLifecycle().addObserver(new LifecycleObserver() {