mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 09:47:13 +00:00
Prevent flicker
This commit is contained in:
parent
ab0ddbfa4d
commit
61701f1e6a
1 changed files with 6 additions and 0 deletions
|
@ -375,11 +375,17 @@ public class FragmentMessage extends FragmentEx {
|
|||
|
||||
db.folder().liveFolders(message.account).removeObservers(getViewLifecycleOwner());
|
||||
db.folder().liveFolders(message.account).observe(getViewLifecycleOwner(), new Observer<List<TupleFolderEx>>() {
|
||||
private boolean once = false;
|
||||
|
||||
@Override
|
||||
public void onChanged(@Nullable List<TupleFolderEx> folders) {
|
||||
if (folders == null)
|
||||
folders = new ArrayList<>();
|
||||
|
||||
if (once)
|
||||
return;
|
||||
once = true;
|
||||
|
||||
boolean inInbox = EntityFolder.INBOX.equals(message.folderType);
|
||||
boolean inOutbox = EntityFolder.OUTBOX.equals(message.folderType);
|
||||
boolean inArchive = EntityFolder.ARCHIVE.equals(message.folderType);
|
||||
|
|
Loading…
Reference in a new issue