Preference: Do not use get() directly

This commit is contained in:
zt515 2017-12-08 23:27:51 +08:00
parent a2a3a86fa1
commit 84f734155b

View File

@ -293,7 +293,7 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) { override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
if (key == getString(R.string.key_ui_fullscreen)) { if (key == getString(R.string.key_ui_fullscreen)) {
setFullScreenMode(NeoPreference.loadBoolean(key, DefaultPreference.enableFullScreen)) setFullScreenMode(NeoPreference.isFullScreenEnabled())
} else if (key == getString(R.string.key_customization_color_scheme)) { } else if (key == getString(R.string.key_customization_color_scheme)) {
if (tabSwitcher.count > 0) { if (tabSwitcher.count > 0) {
val tab = tabSwitcher.selectedTab val tab = tabSwitcher.selectedTab