mirror of
https://github.com/mollyim/mollyim-android.git
synced 2025-05-12 21:30:39 +01:00
Fix settings activity result on config change
This commit is contained in:
parent
21d4aae734
commit
151057be37
3 changed files with 3 additions and 6 deletions
|
@ -56,8 +56,8 @@ open class DSLSettingsActivity : PassphraseRequiredActivity() {
|
|||
}
|
||||
|
||||
override fun onNavigateUp(): Boolean {
|
||||
onWillFinish()
|
||||
return if (!Navigation.findNavController(this, R.id.nav_host_fragment).popBackStack()) {
|
||||
onWillFinish()
|
||||
finish()
|
||||
true
|
||||
} else {
|
||||
|
|
|
@ -82,7 +82,7 @@ class AppSettingsActivity : DSLSettingsActivity(), GooglePayComponent {
|
|||
}
|
||||
}
|
||||
|
||||
intent = intent.putExtra(START_LOCATION, StartLocation.HOME)
|
||||
intent = intent.putExtra(START_LOCATION, StartLocation.HOME.code)
|
||||
|
||||
if (startingAction == null && savedInstanceState != null) {
|
||||
wasConfigurationUpdated = savedInstanceState.getBoolean(STATE_WAS_CONFIGURATION_UPDATED)
|
||||
|
@ -95,6 +95,7 @@ class AppSettingsActivity : DSLSettingsActivity(), GooglePayComponent {
|
|||
SignalStore.settings.onConfigurationSettingChanged.observe(this) { key ->
|
||||
if (key == SettingsValues.THEME) {
|
||||
DynamicTheme.setDefaultDayNightMode(this)
|
||||
wasConfigurationUpdated = true
|
||||
recreate()
|
||||
} else if (key == SettingsValues.LANGUAGE) {
|
||||
CachedInflater.from(this).clear()
|
||||
|
|
|
@ -50,10 +50,6 @@ public class DynamicTheme {
|
|||
Log.d(TAG, "Create configuration different from current previous: " + onCreateNightModeConfiguration + " now: " + ConfigurationUtil.getNightModeConfiguration(activity));
|
||||
CachedInflater.from(activity).clear();
|
||||
}
|
||||
if (onCreateUseDynamicColors != useDynamicColors(activity)) {
|
||||
Log.d(TAG, "Dynamic theme setting changed. Recreating activity...");
|
||||
activity.recreate();
|
||||
}
|
||||
}
|
||||
|
||||
protected @StyleRes int getRegularTheme() {
|
||||
|
|
Loading…
Reference in a new issue