|
|
@ -24,6 +24,7 @@ import kotlinx.coroutines.channels.BufferOverflow.DROP_OLDEST
|
|
|
|
import kotlinx.coroutines.flow.Flow
|
|
|
|
import kotlinx.coroutines.flow.Flow
|
|
|
|
import kotlinx.coroutines.flow.MutableSharedFlow
|
|
|
|
import kotlinx.coroutines.flow.MutableSharedFlow
|
|
|
|
import kotlinx.coroutines.flow.filterNotNull
|
|
|
|
import kotlinx.coroutines.flow.filterNotNull
|
|
|
|
|
|
|
|
import org.jetbrains.annotations.TestOnly
|
|
|
|
|
|
|
|
|
|
|
|
val emptyUserData = UserData(
|
|
|
|
val emptyUserData = UserData(
|
|
|
|
bookmarkedNewsResources = emptySet(),
|
|
|
|
bookmarkedNewsResources = emptySet(),
|
|
|
@ -112,9 +113,7 @@ class TestUserDataRepository : UserDataRepository {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@TestOnly
|
|
|
|
* A test-only API to allow setting of user data directly.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
fun setUserData(userData: UserData) {
|
|
|
|
fun setUserData(userData: UserData) {
|
|
|
|
_userData.tryEmit(userData)
|
|
|
|
_userData.tryEmit(userData)
|
|
|
|
}
|
|
|
|
}
|
|
|
|