mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-28 12:44:34 +01:00
Fix issue where recipient observing could show stale data.
This commit is contained in:
committed by
Alan Evans
parent
dda68d6c95
commit
fba4ae91e3
@@ -87,11 +87,10 @@ public final class LiveRecipient {
|
||||
*/
|
||||
public void observeForever(@NonNull RecipientForeverObserver observer) {
|
||||
Util.postToMain(() -> {
|
||||
observers.add(observer);
|
||||
|
||||
if (observers.size() == 1) {
|
||||
if (observers.isEmpty()) {
|
||||
liveData.observeForever(foreverObserver);
|
||||
}
|
||||
observers.add(observer);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user