diff options
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.kt | 19 |
1 files changed, 0 insertions, 19 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 756f76721..251b5a667 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,15 +3,9 @@ package org.yuzu.yuzu_emu.model -import android.net.Uri -import androidx.fragment.app.FragmentActivity import androidx.lifecycle.ViewModel -import androidx.lifecycle.ViewModelProvider -import androidx.preference.PreferenceManager import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow -import org.yuzu.yuzu_emu.YuzuApplication -import org.yuzu.yuzu_emu.utils.GameHelper class HomeViewModel : ViewModel() { val navigationVisible: StateFlow<Pair<Boolean, Boolean>> get() = _navigationVisible @@ -23,14 +17,6 @@ class HomeViewModel : ViewModel() { val shouldPageForward: StateFlow<Boolean> get() = _shouldPageForward private val _shouldPageForward = MutableStateFlow(false) - val gamesDir: StateFlow<String> get() = _gamesDir - private val _gamesDir = MutableStateFlow( - Uri.parse( - PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext) - .getString(GameHelper.KEY_GAME_PATH, "") - ).path ?: "" - ) - var navigatedToSetup = false fun setNavigationVisibility(visible: Boolean, animated: Boolean) { @@ -50,9 +36,4 @@ class HomeViewModel : ViewModel() { fun setShouldPageForward(pageForward: Boolean) { _shouldPageForward.value = pageForward } - - fun setGamesDir(activity: FragmentActivity, dir: String) { - ViewModelProvider(activity)[GamesViewModel::class.java].reloadGames(true) - _gamesDir.value = dir - } } |