Allow fixing no identities

This commit is contained in:
M66B
2019-09-08 11:21:10 +02:00
parent 4a0972f282
commit da265bcc86
5 changed files with 72 additions and 102 deletions

View File

@@ -172,9 +172,14 @@ public class FragmentAccounts extends FragmentBase {
if (cards && !Helper.isDarkTheme(getContext()))
view.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.lightColorBackground_cards));
if (!settings)
if (settings) {
fab.show();
fabCompose.hide();
} else {
fab.hide();
fabCompose.hide();
fabCompose.show();
}
grpReady.setVisibility(View.GONE);
pbWait.setVisibility(View.VISIBLE);
@@ -215,19 +220,6 @@ public class FragmentAccounts extends FragmentBase {
animator.end();
}
});
if (!settings)
db.identity().liveComposableIdentities(null).observe(getViewLifecycleOwner(),
new Observer<List<TupleIdentityEx>>() {
@Override
public void onChanged(List<TupleIdentityEx> identities) {
if (identities == null || identities.size() == 0)
fabCompose.hide();
else
fabCompose.show();
}
});
}
@Override