Move story work to background thread.

This commit is contained in:
Michelle Tang
2024-10-23 11:33:28 -07:00
committed by Greyson Parrelli
parent ee488ea0b8
commit 1ff6169795
2 changed files with 37 additions and 27 deletions

View File

@@ -1,6 +1,7 @@
package org.thoughtcrime.securesms.stories.viewer.page
import android.app.Application
import io.reactivex.rxjava3.android.plugins.RxAndroidPlugins
import io.reactivex.rxjava3.core.Completable
import io.reactivex.rxjava3.core.Observable
import io.reactivex.rxjava3.plugins.RxJavaPlugins
@@ -28,9 +29,14 @@ class StoryViewerPageViewModelTest {
@Before
fun setUp() {
RxJavaPlugins.setInitIoSchedulerHandler { testScheduler }
RxJavaPlugins.setIoSchedulerHandler { testScheduler }
RxJavaPlugins.setInitComputationSchedulerHandler { testScheduler }
RxJavaPlugins.setComputationSchedulerHandler { testScheduler }
RxAndroidPlugins.setMainThreadSchedulerHandler { testScheduler }
whenever(repository.forceDownload(any())).thenReturn(Completable.complete())
}