kopia lustrzana https://github.com/ryukoposting/Signal-Android
Push repository calls to background.
rodzic
20022b88fc
commit
04677d21bb
|
@ -77,7 +77,7 @@ class StoriesLandingRepository(context: Context) {
|
|||
it.toList() as List<StoriesLandingItemData>
|
||||
}
|
||||
}
|
||||
}
|
||||
}.subscribeOn(Schedulers.io())
|
||||
}
|
||||
|
||||
private fun createStoriesLandingItemData(sender: Recipient, messageRecords: List<MessageRecord>): Observable<StoriesLandingItemData> {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.thoughtcrime.securesms.stories.viewer
|
||||
|
||||
import io.reactivex.rxjava3.core.Single
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.database.model.DistributionListId
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
|
@ -11,7 +12,7 @@ import org.thoughtcrime.securesms.recipients.RecipientId
|
|||
*/
|
||||
open class StoryViewerRepository {
|
||||
fun getStories(hiddenStories: Boolean): Single<List<RecipientId>> {
|
||||
return Single.create { emitter ->
|
||||
return Single.create<List<RecipientId>> { emitter ->
|
||||
val myStoriesId = SignalDatabase.recipients.getOrInsertFromDistributionListId(DistributionListId.MY_STORY)
|
||||
val myStories = Recipient.resolved(myStoriesId)
|
||||
val recipientIds = SignalDatabase.mms.orderedStoryRecipientsAndIds.groupBy {
|
||||
|
@ -36,6 +37,6 @@ open class StoryViewerRepository {
|
|||
recipientIds
|
||||
}
|
||||
)
|
||||
}
|
||||
}.subscribeOn(Schedulers.io())
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue