mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-18 03:48:52 +01:00
Load parts during message sync
This commit is contained in:
@@ -36,7 +36,6 @@ class ReceiveMms @Inject constructor(
|
||||
override fun buildObservable(params: Uri): Flowable<Conversation> {
|
||||
return Flowable.just(params)
|
||||
.flatMap { uri -> syncManager.syncMessage(uri) } // Sync the message
|
||||
.doOnNext { message -> messageRepo.loadParts(message.id) } // Sync the message parts
|
||||
.mapNotNull { message -> messageRepo.getOrCreateConversation(message.threadId) } // Map message to conversation
|
||||
.doOnNext { conversation -> if (conversation.archived) messageRepo.markUnarchived(conversation.id) } // Unarchive conversation if necessary
|
||||
.doOnNext { conversation -> notificationManager.update(conversation.id) } // Update the notification
|
||||
|
||||
Reference in New Issue
Block a user