diff options
Diffstat (limited to 'src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt')
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt index 709a5b976..95bad38c6 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt @@ -26,6 +26,9 @@ class GamesViewModel : ViewModel() { private val _shouldSwapData = MutableLiveData(false) val shouldSwapData: LiveData<Boolean> get() = _shouldSwapData + private val _shouldScrollToTop = MutableLiveData(false) + val shouldScrollToTop: LiveData<Boolean> get() = _shouldScrollToTop + init { reloadGames(false) } @@ -38,6 +41,10 @@ class GamesViewModel : ViewModel() { _shouldSwapData.postValue(shouldSwap) } + fun setShouldScrollToTop(shouldScroll: Boolean) { + _shouldScrollToTop.postValue(shouldScroll) + } + fun reloadGames(directoryChanged: Boolean) { if (isReloading.value == true) return |