1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-28 18:59:01 +00:00

Simplification

This commit is contained in:
M66B 2018-12-05 13:25:55 +01:00
parent c4733427ae
commit d0f5d41ab3

View file

@ -1195,19 +1195,8 @@ public class FragmentMessages extends FragmentEx {
trashes.add(folder.account);
loadMessages();
}
});
if (selectionTracker != null && selectionTracker.hasSelection())
fabMore.show();
else
fabMore.hide();
if (viewType == AdapterMessage.ViewType.THREAD) {
if (actionbar)
db.folder().liveSystemFolders(account).observe(getViewLifecycleOwner(), new Observer<List<EntityFolder>>() {
@Override
public void onChanged(@Nullable List<EntityFolder> folders) {
if (actionbar && viewType == AdapterMessage.ViewType.THREAD) {
boolean hasTrash = false;
boolean hasArchive = false;
if (folders != null)
@ -1227,8 +1216,15 @@ public class FragmentMessages extends FragmentEx {
bottom_navigation.getMenu().findItem(R.id.action_archive).setVisible(hasArchive);
bottom_navigation.setVisibility(View.VISIBLE);
}
}
});
} else {
if (selectionTracker != null && selectionTracker.hasSelection())
fabMore.show();
else
fabMore.hide();
if (viewType != AdapterMessage.ViewType.THREAD) {
db.folder().liveDrafts(account < 0 ? null : account).observe(getViewLifecycleOwner(), new Observer<EntityFolder>() {
@Override
public void onChanged(EntityFolder drafts) {