Take threading into account for account unread count

This commit is contained in:
M66B
2018-12-16 19:35:54 +01:00
parent bb9708f17f
commit 1cb75e8720
6 changed files with 20 additions and 14 deletions

View File

@@ -354,13 +354,13 @@ public class FragmentSetup extends FragmentEx {
final DB db = DB.getInstance(getContext());
db.account().liveAccounts(true).observe(getViewLifecycleOwner(), new Observer<List<TupleAccountEx>>() {
db.account().liveAccounts(true).observe(getViewLifecycleOwner(), new Observer<List<EntityAccount>>() {
private boolean done = false;
private LiveData<EntityFolder> livePrimaryDrafts = null;
private LiveData<EntityFolder> livePrimaryArchive = null;
@Override
public void onChanged(@Nullable List<TupleAccountEx> accounts) {
public void onChanged(@Nullable List<EntityAccount> accounts) {
done = (accounts != null && accounts.size() > 0);
btnIdentity.setEnabled(done);