diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/libdetail/LibraryDetailViewModel.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/libdetail/LibraryDetailViewModel.kt index 51b84357..fd2dc13b 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/libdetail/LibraryDetailViewModel.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/libdetail/LibraryDetailViewModel.kt @@ -14,6 +14,7 @@ import com.theapache64.stackzy.util.R import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch import javax.inject.Inject diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListViewModel.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListViewModel.kt index e985b80b..4cd14e4b 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListViewModel.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/liblist/LibraryListViewModel.kt @@ -10,6 +10,7 @@ import com.theapache64.stackzy.ui.util.getSingularOrPlural import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch import java.util.* import javax.inject.Inject diff --git a/src/main/kotlin/com/theapache64/stackzy/ui/feature/splash/SplashViewModel.kt b/src/main/kotlin/com/theapache64/stackzy/ui/feature/splash/SplashViewModel.kt index 23adc8ee..40e349e8 100644 --- a/src/main/kotlin/com/theapache64/stackzy/ui/feature/splash/SplashViewModel.kt +++ b/src/main/kotlin/com/theapache64/stackzy/ui/feature/splash/SplashViewModel.kt @@ -12,6 +12,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.launch +import kotlinx.coroutines.flow.collect import java.io.IOException import javax.inject.Inject diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/AuthRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/AuthRepoTest.kt index 3e638163..2696cf04 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/AuthRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/AuthRepoTest.kt @@ -9,6 +9,7 @@ import com.toxicbakery.logging.Arbor import it.cosenonjaviste.daggermock.InjectFromComponent import org.junit.Rule import org.junit.Test +import kotlinx.coroutines.flow.collect class AuthRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/ConfigRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/ConfigRepoTest.kt index 91207602..5ef4a770 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/ConfigRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/ConfigRepoTest.kt @@ -8,6 +8,7 @@ import com.toxicbakery.logging.Arbor import it.cosenonjaviste.daggermock.InjectFromComponent import org.junit.Rule import org.junit.Test +import kotlinx.coroutines.flow.collect class ConfigRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/LibrariesRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/LibrariesRepoTest.kt index 88e02200..5c20ec9b 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/LibrariesRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/LibrariesRepoTest.kt @@ -7,6 +7,7 @@ import com.theapache64.stackzy.test.runBlockingUnitTest import it.cosenonjaviste.daggermock.InjectFromComponent import org.junit.Rule import org.junit.Test +import kotlinx.coroutines.flow.collect internal class LibrariesRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/PlayStoreRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/PlayStoreRepoTest.kt index 7c2c68b1..39930479 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/PlayStoreRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/PlayStoreRepoTest.kt @@ -12,6 +12,7 @@ import org.junit.Rule import org.junit.Test import org.junit.jupiter.api.BeforeAll import org.junit.jupiter.api.TestInstance +import kotlinx.coroutines.flow.collect @TestInstance(TestInstance.Lifecycle.PER_CLASS) class PlayStoreRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/ResultsRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/ResultsRepoTest.kt index 3979bd76..907354ad 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/ResultsRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/ResultsRepoTest.kt @@ -17,6 +17,7 @@ import org.junit.Rule import org.junit.Test import org.junit.jupiter.api.BeforeAll import kotlin.io.path.createTempDirectory +import kotlinx.coroutines.flow.collect class ResultsRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/data/repo/UntrackedLibsRepoTest.kt b/src/test/kotlin/com/theapache64/stackzy/data/repo/UntrackedLibsRepoTest.kt index 7f1090d7..264751f1 100644 --- a/src/test/kotlin/com/theapache64/stackzy/data/repo/UntrackedLibsRepoTest.kt +++ b/src/test/kotlin/com/theapache64/stackzy/data/repo/UntrackedLibsRepoTest.kt @@ -8,6 +8,7 @@ import com.theapache64.stackzy.test.runBlockingUnitTest import it.cosenonjaviste.daggermock.InjectFromComponent import org.junit.Rule import org.junit.Test +import kotlinx.coroutines.flow.collect internal class UntrackedLibsRepoTest { diff --git a/src/test/kotlin/com/theapache64/stackzy/util/LibrariesRepoExt.kt b/src/test/kotlin/com/theapache64/stackzy/util/LibrariesRepoExt.kt index af0b61cd..53d632fa 100644 --- a/src/test/kotlin/com/theapache64/stackzy/util/LibrariesRepoExt.kt +++ b/src/test/kotlin/com/theapache64/stackzy/util/LibrariesRepoExt.kt @@ -4,6 +4,7 @@ import com.theapache64.stackzy.data.remote.Library import com.theapache64.stackzy.data.repo.LibrariesRepo import com.theapache64.stackzy.data.util.calladapter.flow.Resource import com.toxicbakery.logging.Arbor +import kotlinx.coroutines.flow.collect suspend fun LibrariesRepo.loadLibs(onLibsLoaded: suspend (List) -> Unit) { getRemoteLibraries().collect {