mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
add an offline mode that stays on the downloaded library
This commit is contained in:
@@ -53,6 +53,12 @@ class SettingsViewModel(
|
||||
.scrobbling()
|
||||
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), true)
|
||||
|
||||
val offline: StateFlow<Boolean> = sourceRepository.offline
|
||||
|
||||
fun setOfflineMode(enabled: Boolean) {
|
||||
sourceRepository.setOfflineMode(enabled)
|
||||
}
|
||||
|
||||
fun selectSource(id: Long) {
|
||||
viewModelScope.launch { sourceRepository.selectSource(id) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user