We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38645b0 commit fa98a92Copy full SHA for fa98a92
1 file changed
app/src/main/java/org/schabi/newpipe/local/history/HistoryViewModel.kt
@@ -6,6 +6,7 @@ import androidx.lifecycle.SavedStateHandle
6
import androidx.lifecycle.viewModelScope
7
import androidx.paging.Pager
8
import androidx.paging.PagingConfig
9
+import androidx.paging.cachedIn
10
import androidx.paging.map
11
import kotlinx.coroutines.Dispatchers
12
import kotlinx.coroutines.flow.flatMapLatest
@@ -48,6 +49,7 @@ class HistoryViewModel(
48
49
}
50
51
.flowOn(Dispatchers.IO)
52
+ .cachedIn(viewModelScope)
53
54
fun updateOrder(sortKey: SortKey) {
55
savedStateHandle[ORDER_KEY] = sortKey
0 commit comments