mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Fix some timing issues around recipient events.
This commit is contained in:
@@ -50,9 +50,11 @@ public final class LiveRecipient {
|
||||
this.groupDatabase = DatabaseFactory.getGroupDatabase(context);
|
||||
this.observers = new CopyOnWriteArraySet<>();
|
||||
this.foreverObserver = recipient -> {
|
||||
for (RecipientForeverObserver o : observers) {
|
||||
o.onRecipientChanged(recipient);
|
||||
}
|
||||
ThreadUtil.postToMain(() -> {
|
||||
for (RecipientForeverObserver o : observers) {
|
||||
o.onRecipientChanged(recipient);
|
||||
}
|
||||
});
|
||||
};
|
||||
this.refreshForceNotify = new MutableLiveData<>(new Object());
|
||||
this.observableLiveData = LiveDataUtil.combineLatest(LiveDataUtil.distinctUntilChanged(liveData, Recipient::hasSameContent),
|
||||
|
||||
Reference in New Issue
Block a user