pull/146/head
M66B 6 years ago
parent 787e4a983e
commit 271a36cde5

@ -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

@ -86,8 +86,10 @@ public class ServiceTileUnseen extends TileService {
public void onStopListening() {
Log.i(Helper.TAG, "Stop tile unseen");
if (liveMessages != null)
if (liveMessages != null) {
liveMessages.removeObservers(owner);
liveMessages = null;
}
}
public void onClick() {

Loading…
Cancel
Save