mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 14:11:00 +00:00
Revert "Conditionally update navigation menu"
This reverts commit 9ab964e659
.
This commit is contained in:
parent
79937006ff
commit
2f74804d50
1 changed files with 0 additions and 17 deletions
|
@ -250,28 +250,11 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
getSupportFragmentManager().addOnBackStackChangedListener(this);
|
getSupportFragmentManager().addOnBackStackChangedListener(this);
|
||||||
|
|
||||||
DB.getInstance(this).account().liveAccounts(true, threading).observe(this, new Observer<List<TupleAccountEx>>() {
|
DB.getInstance(this).account().liveAccounts(true, threading).observe(this, new Observer<List<TupleAccountEx>>() {
|
||||||
private List<TupleAccountEx> last = new ArrayList<>();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(@Nullable List<TupleAccountEx> accounts) {
|
public void onChanged(@Nullable List<TupleAccountEx> accounts) {
|
||||||
if (accounts == null)
|
if (accounts == null)
|
||||||
accounts = new ArrayList<>();
|
accounts = new ArrayList<>();
|
||||||
|
|
||||||
boolean same = true;
|
|
||||||
if (accounts.size() == last.size()) {
|
|
||||||
for (int i = 0; i < accounts.size(); i++)
|
|
||||||
if (accounts.get(i).equals(last.get((i)))) {
|
|
||||||
same = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
same = false;
|
|
||||||
|
|
||||||
if (same)
|
|
||||||
return;
|
|
||||||
else
|
|
||||||
last = accounts;
|
|
||||||
|
|
||||||
ArrayAdapterDrawer drawerArray = new ArrayAdapterDrawer(ActivityView.this);
|
ArrayAdapterDrawer drawerArray = new ArrayAdapterDrawer(ActivityView.this);
|
||||||
|
|
||||||
final Collator collator = Collator.getInstance(Locale.getDefault());
|
final Collator collator = Collator.getInstance(Locale.getDefault());
|
||||||
|
|
Loading…
Reference in a new issue