Activity recreate method changed because it didn't work properly on Android older than 9
This commit is contained in:
parent
47441a9837
commit
c3d5928c1f
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ import android.os.Bundle
|
|||
import androidx.annotation.LayoutRes
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.lifecycle.asLiveData
|
||||
import com.fsck.k9.controller.push.PushController
|
||||
import java.util.Locale
|
||||
|
@ -40,7 +41,7 @@ abstract class K9Activity(private val themeType: ThemeType) : AppCompatActivity(
|
|||
private fun listenForAppLanguageChanges() {
|
||||
appLanguageManager.overrideLocale.asLiveData().observe(this) { overrideLocale ->
|
||||
if (overrideLocale != overrideLocaleOnLaunch) {
|
||||
recreate()
|
||||
ActivityCompat.recreate(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue