summaryrefslogtreecommitdiffstats
path: root/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt
index 07e65b028..513ac2fc5 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt
@@ -3,6 +3,7 @@
package org.yuzu.yuzu_emu.model
+import android.net.Uri
import androidx.lifecycle.ViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
@@ -21,6 +22,15 @@ class HomeViewModel : ViewModel() {
private val _gamesDirSelected = MutableStateFlow(false)
val gamesDirSelected get() = _gamesDirSelected.asStateFlow()
+ private val _openImportSaves = MutableStateFlow(false)
+ val openImportSaves get() = _openImportSaves.asStateFlow()
+
+ private val _contentToInstall = MutableStateFlow<List<Uri>?>(null)
+ val contentToInstall get() = _contentToInstall.asStateFlow()
+
+ private val _reloadPropertiesList = MutableStateFlow(false)
+ val reloadPropertiesList get() = _reloadPropertiesList.asStateFlow()
+
var navigatedToSetup = false
fun setNavigationVisibility(visible: Boolean, animated: Boolean) {
@@ -44,4 +54,16 @@ class HomeViewModel : ViewModel() {
fun setGamesDirSelected(selected: Boolean) {
_gamesDirSelected.value = selected
}
+
+ fun setOpenImportSaves(import: Boolean) {
+ _openImportSaves.value = import
+ }
+
+ fun setContentToInstall(documents: List<Uri>?) {
+ _contentToInstall.value = documents
+ }
+
+ fun reloadPropertiesList(reload: Boolean) {
+ _reloadPropertiesList.value = reload
+ }
}