mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-20 07:10:15 +01:00
Reduce thrashing on multiple identity change events.
This commit is contained in:
committed by
Michelle Tang
parent
0cf7705d4f
commit
2e9fd87b06
+2
-1
@@ -329,7 +329,8 @@ class ConversationViewModel(
|
||||
recipientRepository.groupRecord
|
||||
) { _, r, g -> Pair(r, g) }
|
||||
.subscribeOn(Schedulers.io())
|
||||
.flatMapSingle { (r, g) -> repository.getIdentityRecords(r, g.orNull()) }
|
||||
.throttleLatest(250, TimeUnit.MILLISECONDS, true)
|
||||
.switchMapSingle { (r, g) -> repository.getIdentityRecords(r, g.orNull()) }
|
||||
.subscribeBy { newState ->
|
||||
identityRecordsStore.update { newState }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user