diff --git a/app/src/main/java/org/mozilla/fenix/settings/advanced/DefaultLocaleSettingsController.kt b/app/src/main/java/org/mozilla/fenix/settings/advanced/DefaultLocaleSettingsController.kt index 8b78c7592b..381cc5d5f9 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/advanced/DefaultLocaleSettingsController.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/advanced/DefaultLocaleSettingsController.kt @@ -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) { diff --git a/app/src/test/java/org/mozilla/fenix/settings/advanced/LocaleSettingsControllerTest.kt b/app/src/test/java/org/mozilla/fenix/settings/advanced/LocaleSettingsControllerTest.kt index d55b6f2eaf..a057a5d908 100644 --- a/app/src/test/java/org/mozilla/fenix/settings/advanced/LocaleSettingsControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/settings/advanced/LocaleSettingsControllerTest.kt @@ -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) } }