This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Roman Chernyak (aka @electrolobzik) on 2024-02-22 | |
*/ | |
class Paginator<Data : Any, Cursor : Any>( | |
coroutineContext: CoroutineContext | |
) : CoroutineScope by CoroutineScope(coroutineContext) { | |
private val _state = MutableStateFlow<State<Data, Cursor>>(State.NoData.Empty()) | |
private val _sideEffects = MutableSharedFlow<SideEffect<Cursor>>() | |
private val inputActions = MutableSharedFlow<Action<Data, Cursor>>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReceivedMediaRepository( | |
private val receivedMediaApiHelper: ReceivedMediaApiHelper, | |
private val receivedMediaDbHelper: ReceivedMediaDbHelper, | |
coroutineContext: CoroutineContext, | |
) : CoroutineScope by CoroutineScope(coroutineContext) { | |
private val coroutineScope = CoroutineScope(coroutineContext) | |
private val factory = ReceivedMediaStoreFactory(api = receivedMediaApiHelper, db = receivedMediaDbHelper) | |
private val mutableStore = factory.create() |
OlderNewer