mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Show messages in QkReplyActivity
This commit is contained in:
@@ -40,7 +40,11 @@ class QkReplyViewModel(intent: Intent) : QkViewModel<QkReplyView, QkReplyState>(
|
||||
.asObservable<Conversation>()
|
||||
.filter { it.isLoaded }
|
||||
.filter { it.isValid }
|
||||
.subscribe { conversation -> newState { it.copy(title = conversation.getTitle()) } }
|
||||
.distinctUntilChanged()
|
||||
.doOnNext { conversation -> newState { it.copy(title = conversation.getTitle()) } }
|
||||
.map { conversation -> Pair(conversation, messageRepo.getUnreadMessages(conversation.id)) }
|
||||
.doOnNext { data -> newState { it.copy(data = data) } }
|
||||
.subscribe()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user