diff options
3 files changed, 4 insertions, 28 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt index 3c4aefbcb..769baf744 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt | |||
| @@ -87,17 +87,6 @@ class SettingsFragment : Fragment() { | |||
| 87 | } | 87 | } |
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| 90 | launch { | ||
| 91 | settingsViewModel.isUsingSearch.collectLatest { | ||
| 92 | if (it) { | ||
| 93 | reenterTransition = MaterialSharedAxis(MaterialSharedAxis.Z, true) | ||
| 94 | exitTransition = MaterialSharedAxis(MaterialSharedAxis.Z, false) | ||
| 95 | } else { | ||
| 96 | reenterTransition = MaterialSharedAxis(MaterialSharedAxis.X, false) | ||
| 97 | exitTransition = MaterialSharedAxis(MaterialSharedAxis.X, true) | ||
| 98 | } | ||
| 99 | } | ||
| 100 | } | ||
| 101 | } | 90 | } |
| 102 | 91 | ||
| 103 | if (args.menuTag == Settings.MenuTag.SECTION_ROOT) { | 92 | if (args.menuTag == Settings.MenuTag.SECTION_ROOT) { |
| @@ -105,8 +94,6 @@ class SettingsFragment : Fragment() { | |||
| 105 | binding.toolbarSettings.setOnMenuItemClickListener { | 94 | binding.toolbarSettings.setOnMenuItemClickListener { |
| 106 | when (it.itemId) { | 95 | when (it.itemId) { |
| 107 | R.id.action_search -> { | 96 | R.id.action_search -> { |
| 108 | reenterTransition = MaterialSharedAxis(MaterialSharedAxis.Z, true) | ||
| 109 | exitTransition = MaterialSharedAxis(MaterialSharedAxis.Z, false) | ||
| 110 | view.findNavController() | 97 | view.findNavController() |
| 111 | .navigate(R.id.action_settingsFragment_to_settingsSearchFragment) | 98 | .navigate(R.id.action_settingsFragment_to_settingsSearchFragment) |
| 112 | true | 99 | true |
| @@ -122,11 +109,6 @@ class SettingsFragment : Fragment() { | |||
| 122 | setInsets() | 109 | setInsets() |
| 123 | } | 110 | } |
| 124 | 111 | ||
| 125 | override fun onResume() { | ||
| 126 | super.onResume() | ||
| 127 | settingsViewModel.setIsUsingSearch(false) | ||
| 128 | } | ||
| 129 | |||
| 130 | private fun setInsets() { | 112 | private fun setInsets() { |
| 131 | ViewCompat.setOnApplyWindowInsetsListener( | 113 | ViewCompat.setOnApplyWindowInsetsListener( |
| 132 | binding.root | 114 | binding.root |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SettingsSearchFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SettingsSearchFragment.kt index 9d0594c6e..f95d545bf 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SettingsSearchFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SettingsSearchFragment.kt | |||
| @@ -40,8 +40,10 @@ class SettingsSearchFragment : Fragment() { | |||
| 40 | 40 | ||
| 41 | override fun onCreate(savedInstanceState: Bundle?) { | 41 | override fun onCreate(savedInstanceState: Bundle?) { |
| 42 | super.onCreate(savedInstanceState) | 42 | super.onCreate(savedInstanceState) |
| 43 | enterTransition = MaterialSharedAxis(MaterialSharedAxis.Z, false) | 43 | enterTransition = MaterialSharedAxis(MaterialSharedAxis.X, true) |
| 44 | returnTransition = MaterialSharedAxis(MaterialSharedAxis.Z, true) | 44 | returnTransition = MaterialSharedAxis(MaterialSharedAxis.X, false) |
| 45 | reenterTransition = MaterialSharedAxis(MaterialSharedAxis.X, false) | ||
| 46 | exitTransition = MaterialSharedAxis(MaterialSharedAxis.X, true) | ||
| 45 | } | 47 | } |
| 46 | 48 | ||
| 47 | override fun onCreateView( | 49 | override fun onCreateView( |
| @@ -55,7 +57,6 @@ class SettingsSearchFragment : Fragment() { | |||
| 55 | 57 | ||
| 56 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | 58 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
| 57 | super.onViewCreated(view, savedInstanceState) | 59 | super.onViewCreated(view, savedInstanceState) |
| 58 | settingsViewModel.setIsUsingSearch(true) | ||
| 59 | 60 | ||
| 60 | if (savedInstanceState != null) { | 61 | if (savedInstanceState != null) { |
| 61 | binding.searchText.setText(savedInstanceState.getString(SEARCH_TEXT)) | 62 | binding.searchText.setText(savedInstanceState.getString(SEARCH_TEXT)) |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/SettingsViewModel.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/SettingsViewModel.kt index 53fa7a8de..6f947674e 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/SettingsViewModel.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/SettingsViewModel.kt | |||
| @@ -29,9 +29,6 @@ class SettingsViewModel : ViewModel() { | |||
| 29 | val shouldReloadSettingsList: StateFlow<Boolean> get() = _shouldReloadSettingsList | 29 | val shouldReloadSettingsList: StateFlow<Boolean> get() = _shouldReloadSettingsList |
| 30 | private val _shouldReloadSettingsList = MutableStateFlow(false) | 30 | private val _shouldReloadSettingsList = MutableStateFlow(false) |
| 31 | 31 | ||
| 32 | val isUsingSearch: StateFlow<Boolean> get() = _isUsingSearch | ||
| 33 | private val _isUsingSearch = MutableStateFlow(false) | ||
| 34 | |||
| 35 | val sliderProgress: StateFlow<Int> get() = _sliderProgress | 32 | val sliderProgress: StateFlow<Int> get() = _sliderProgress |
| 36 | private val _sliderProgress = MutableStateFlow(-1) | 33 | private val _sliderProgress = MutableStateFlow(-1) |
| 37 | 34 | ||
| @@ -57,10 +54,6 @@ class SettingsViewModel : ViewModel() { | |||
| 57 | _shouldReloadSettingsList.value = value | 54 | _shouldReloadSettingsList.value = value |
| 58 | } | 55 | } |
| 59 | 56 | ||
| 60 | fun setIsUsingSearch(value: Boolean) { | ||
| 61 | _isUsingSearch.value = value | ||
| 62 | } | ||
| 63 | |||
| 64 | fun setSliderTextValue(value: Float, units: String) { | 57 | fun setSliderTextValue(value: Float, units: String) { |
| 65 | _sliderProgress.value = value.toInt() | 58 | _sliderProgress.value = value.toInt() |
| 66 | _sliderTextValue.value = String.format( | 59 | _sliderTextValue.value = String.format( |