Fix bug where wallpaper didn't update after changing.

This commit is contained in:
Greyson Parrelli
2022-03-16 17:36:17 -04:00
committed by Cody Henthorne
parent 0359f27cd9
commit 604f6709db
3 changed files with 20 additions and 3 deletions

View File

@@ -187,9 +187,11 @@ public class ConversationViewModel extends ViewModel {
.observeOn(Schedulers.io())
.withLatestFrom(conversationMetadata, (messages, metadata) -> new MessageData(metadata, messages));
Observable<Recipient> liveRecipient = recipientId.distinctUntilChanged().switchMap(id -> Recipient.live(id).asObservable());
canShowAsBubble = threadId.observeOn(Schedulers.io()).map(conversationRepository::canShowAsBubble);
wallpaper = recipientCache.map(r -> Optional.ofNullable(r.getWallpaper())).distinctUntilChanged();
chatColors = recipientCache.map(Recipient::getChatColors).distinctUntilChanged();
wallpaper = liveRecipient.map(r -> Optional.ofNullable(r.getWallpaper())).distinctUntilChanged();
chatColors = liveRecipient.map(Recipient::getChatColors).distinctUntilChanged();
threadAnimationStateStore.update(threadId, (id, state) -> {
if (state.getThreadId() == id) {