File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
app/src/main/kotlin/org/akanework/gramophone/ui/adapters Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,11 @@ import kotlinx.coroutines.NonCancellable
4747import kotlinx.coroutines.cancel
4848import kotlinx.coroutines.flow.Flow
4949import kotlinx.coroutines.flow.MutableStateFlow
50+ import kotlinx.coroutines.flow.SharingStarted
5051import kotlinx.coroutines.flow.combine
5152import kotlinx.coroutines.flow.first
5253import kotlinx.coroutines.flow.flatMapLatest
54+ import kotlinx.coroutines.flow.shareIn
5355import kotlinx.coroutines.launch
5456import kotlinx.coroutines.runBlocking
5557import kotlinx.coroutines.sync.Semaphore
@@ -178,7 +180,7 @@ abstract class BaseAdapter<T>(
178180 }
179181 }
180182 }.toList()
181- }
183+ }.shareIn( CoroutineScope ( Dispatchers . Default ), SharingStarted . WhileSubscribed ( 5000 ), replay = 1 )
182184 val sortTypes: Set <Sorter .Type >
183185 get() = if (canSort) sorter.getSupportedTypes() else setOf (Sorter .Type .None )
184186
You can’t perform that action at this time.
0 commit comments