mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
fix #156, properly switch language after toggling Use english
This commit is contained in:
@ -38,8 +38,6 @@ class MainActivity : SimpleActivity() {
|
||||
private var wasBackJustPressed = false
|
||||
private var searchMenuItem: MenuItem? = null
|
||||
|
||||
private var storedUseEnglish = false
|
||||
|
||||
private lateinit var fragment: ItemsFragment
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
@ -59,20 +57,6 @@ class MainActivity : SimpleActivity() {
|
||||
|
||||
checkWhatsNewDialog()
|
||||
checkIfRootAvailable()
|
||||
storeStateVariables()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (storedUseEnglish != config.useEnglish) {
|
||||
restartActivity()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
storeStateVariables()
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
@ -132,10 +116,6 @@ class MainActivity : SimpleActivity() {
|
||||
openPath(savedInstanceState.getString(PICKED_PATH), true)
|
||||
}
|
||||
|
||||
private fun storeStateVariables() {
|
||||
storedUseEnglish = config.useEnglish
|
||||
}
|
||||
|
||||
private fun setupSearch(menu: Menu) {
|
||||
val searchManager = getSystemService(Context.SEARCH_SERVICE) as SearchManager
|
||||
searchMenuItem = menu.findItem(R.id.search)
|
||||
|
Reference in New Issue
Block a user