Browse Source

Force app restart after theme change

merge-requests/2298/head
Nicolas Pomepuy 1 year ago
parent
commit
ddf954d4f9
  1. 3
      application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesUi.kt

3
application/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesUi.kt

@ -36,7 +36,6 @@ import androidx.preference.TwoStatePreference
import org.videolan.medialibrary.Tools
import org.videolan.medialibrary.interfaces.Medialibrary
import org.videolan.resources.AndroidDevices
import org.videolan.resources.AppContextProvider
import org.videolan.tools.KEY_APP_THEME
import org.videolan.tools.KEY_ARTISTS_SHOW_ALL
import org.videolan.tools.KEY_BLACK_THEME
@ -158,7 +157,7 @@ class PreferencesUi : BasePreferenceFragment(), SharedPreferences.OnSharedPrefer
UiTools.restartDialog(requireActivity())
}
KEY_APP_THEME -> {
if (!AppContextProvider.locale.isNullOrEmpty()) UiTools.restartDialog(requireActivity()) else (activity as PreferencesActivity).exitAndRescan()
UiTools.restartDialog(requireActivity())
}
LIST_TITLE_ELLIPSIZE -> {
Settings.listTitleEllipsize = sharedPreferences.getString(LIST_TITLE_ELLIPSIZE, "0")?.toInt() ?: 0

Loading…
Cancel
Save