mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
For #20029: Remove animations when recreating activity on locale change.
This commit is contained in:
parent
9693507ffb
commit
b43db5f2b6
@ -31,6 +31,7 @@ class DefaultLocaleSettingsController(
|
||||
LocaleManager.setNewLocale(activity, localeUseCase, locale)
|
||||
LocaleManager.updateBaseConfiguration(activity, locale)
|
||||
activity.recreate()
|
||||
activity.overridePendingTransition(0, 0)
|
||||
}
|
||||
|
||||
override fun handleDefaultLocaleSelected() {
|
||||
@ -41,6 +42,7 @@ class DefaultLocaleSettingsController(
|
||||
LocaleManager.resetToSystemDefault(activity, localeUseCase)
|
||||
LocaleManager.updateBaseConfiguration(activity, localeSettingsStore.state.localeList[0])
|
||||
activity.recreate()
|
||||
activity.overridePendingTransition(0, 0)
|
||||
}
|
||||
|
||||
override fun handleSearchQueryTyped(query: String) {
|
||||
|
@ -79,6 +79,8 @@ class LocaleSettingsControllerTest {
|
||||
verify { localeSettingsStore.dispatch(LocaleSettingsAction.Select(selectedLocale)) }
|
||||
verify { LocaleManager.setNewLocale(activity, localeUseCases, selectedLocale) }
|
||||
verify { activity.recreate() }
|
||||
verify { activity.overridePendingTransition(0, 0) }
|
||||
|
||||
with(controller) {
|
||||
verify { LocaleManager.updateBaseConfiguration(activity, selectedLocale) }
|
||||
}
|
||||
@ -101,6 +103,8 @@ class LocaleSettingsControllerTest {
|
||||
verify { localeSettingsStore.dispatch(LocaleSettingsAction.Select(selectedLocale)) }
|
||||
verify { LocaleManager.setNewLocale(activity, localeUseCases, selectedLocale) }
|
||||
verify { activity.recreate() }
|
||||
verify { activity.overridePendingTransition(0, 0) }
|
||||
|
||||
with(controller) {
|
||||
verify { LocaleManager.updateBaseConfiguration(activity, selectedLocale) }
|
||||
}
|
||||
@ -139,6 +143,8 @@ class LocaleSettingsControllerTest {
|
||||
verify { localeSettingsStore.dispatch(LocaleSettingsAction.Select(selectedLocale)) }
|
||||
verify { LocaleManager.resetToSystemDefault(activity, localeUseCases) }
|
||||
verify { activity.recreate() }
|
||||
verify { activity.overridePendingTransition(0, 0) }
|
||||
|
||||
with(controller) {
|
||||
verify { LocaleManager.updateBaseConfiguration(activity, selectedLocale) }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user