Always use ActivityCompat.recreate()
This commit is contained in:
parent
c3d5928c1f
commit
49160cb1a9
2 changed files with 7 additions and 3 deletions
|
@ -41,7 +41,7 @@ abstract class K9Activity(private val themeType: ThemeType) : AppCompatActivity(
|
|||
private fun listenForAppLanguageChanges() {
|
||||
appLanguageManager.overrideLocale.asLiveData().observe(this) { overrideLocale ->
|
||||
if (overrideLocale != overrideLocaleOnLaunch) {
|
||||
ActivityCompat.recreate(this)
|
||||
recreateCompat()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,10 @@ abstract class K9Activity(private val themeType: ThemeType) : AppCompatActivity(
|
|||
|
||||
setSupportActionBar(toolbar)
|
||||
}
|
||||
|
||||
protected fun recreateCompat() {
|
||||
ActivityCompat.recreate(this)
|
||||
}
|
||||
}
|
||||
|
||||
enum class ThemeType {
|
||||
|
|
|
@ -542,7 +542,7 @@ open class MessageList :
|
|||
if (messageListActivityAppearance == null) {
|
||||
messageListActivityAppearance = MessageListActivityAppearance.create(generalSettingsManager)
|
||||
} else if (messageListActivityAppearance != MessageListActivityAppearance.create(generalSettingsManager)) {
|
||||
recreate()
|
||||
recreateCompat()
|
||||
}
|
||||
|
||||
if (displayMode != DisplayMode.MESSAGE_VIEW) {
|
||||
|
@ -1512,7 +1512,7 @@ open class MessageList :
|
|||
|
||||
private fun onToggleTheme() {
|
||||
themeManager.toggleMessageViewTheme()
|
||||
recreate()
|
||||
recreateCompat()
|
||||
}
|
||||
|
||||
private fun showDefaultTitleView() {
|
||||
|
|
Loading…
Reference in a new issue