This commit is contained in:
M66B
2018-12-05 14:36:18 +01:00
parent 787e4a983e
commit 271a36cde5
2 changed files with 5 additions and 4 deletions

View File

@@ -1376,10 +1376,9 @@ public class FragmentCompose extends FragmentEx {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
EntityAccount account = (EntityAccount) parent.getAdapter().getItem(position);
if (liveIdentities == null)
liveIdentities = db.identity().liveIdentities(account.id, true);
else
if (liveIdentities != null)
liveIdentities.removeObservers(getViewLifecycleOwner());
liveIdentities = db.identity().liveIdentities(account.id, true);
liveIdentities.observe(getViewLifecycleOwner(), new Observer<List<EntityIdentity>>() {
@Override