diff --git a/app/src/main/java/eu/faircode/email/ViewModelMessages.java b/app/src/main/java/eu/faircode/email/ViewModelMessages.java index b49a9b4943..19dd07a605 100644 --- a/app/src/main/java/eu/faircode/email/ViewModelMessages.java +++ b/app/src/main/java/eu/faircode/email/ViewModelMessages.java @@ -175,7 +175,10 @@ public class ViewModelMessages extends ViewModel { } else if (viewType == AdapterMessage.ViewType.FOLDER) remove(AdapterMessage.ViewType.SEARCH); - last = viewType; + if (viewType != AdapterMessage.ViewType.THREAD) { + last = viewType; + Log.i("Last model=" + last); + } Log.i("Returning model=" + viewType); dump(); @@ -334,6 +337,7 @@ public class ViewModelMessages extends ViewModel { } void setObserver(LifecycleOwner owner, @NonNull Observer> observer) { + //list.removeObservers(owner); list.observe(owner, observer); }