@@ -382,7 +382,7 @@ class SettingsFragment : BaseFragment() {
382382 titleFontSize = titleFontSize,
383383 descriptionFontSize = descriptionFontSize,
384384 iconSize = iconSize,
385- onClick = { currentScreen = " features" },
385+ onClick = { currentScreen = " features" }
386386 )
387387
388388 // 2. Look & Feel
@@ -393,7 +393,7 @@ class SettingsFragment : BaseFragment() {
393393 titleFontSize = titleFontSize,
394394 descriptionFontSize = descriptionFontSize,
395395 iconSize = iconSize,
396- onClick = { currentScreen = " look_feel" },
396+ onClick = { currentScreen = " look_feel" }
397397 )
398398
399399 // 3. Gestures
@@ -404,7 +404,7 @@ class SettingsFragment : BaseFragment() {
404404 titleFontSize = titleFontSize,
405405 descriptionFontSize = descriptionFontSize,
406406 iconSize = iconSize,
407- onClick = { currentScreen = " gestures" },
407+ onClick = { currentScreen = " gestures" }
408408 )
409409
410410 // 4. Notes
@@ -415,7 +415,7 @@ class SettingsFragment : BaseFragment() {
415415 titleFontSize = titleFontSize,
416416 descriptionFontSize = descriptionFontSize,
417417 iconSize = iconSize,
418- onClick = { currentScreen = " notes" },
418+ onClick = { currentScreen = " notes" }
419419 )
420420
421421 // 5. Private Spaces (if supported)
@@ -447,7 +447,7 @@ class SettingsFragment : BaseFragment() {
447447 titleFontSize = titleFontSize,
448448 descriptionFontSize = descriptionFontSize,
449449 iconSize = iconSize,
450- onClick = { showFavoriteApps() },
450+ onClick = { showFavoriteApps() }
451451 )
452452
453453 SettingsHomeItem (
@@ -457,7 +457,7 @@ class SettingsFragment : BaseFragment() {
457457 titleFontSize = titleFontSize,
458458 descriptionFontSize = descriptionFontSize,
459459 iconSize = iconSize,
460- onClick = { showHiddenApps() },
460+ onClick = { showHiddenApps() }
461461 )
462462
463463 SettingsHomeItem (
@@ -467,18 +467,18 @@ class SettingsFragment : BaseFragment() {
467467 titleFontSize = titleFontSize,
468468 descriptionFontSize = descriptionFontSize,
469469 iconSize = iconSize,
470- onClick = { currentScreen = " advanced" },
470+ onClick = { currentScreen = " advanced" }
471471 )
472472
473- if (prefs.enableExpertOptions ) {
473+ if (toggledExpertOptions ) {
474474 SettingsHomeItem (
475475 title = getLocalizedString(R .string.settings_expert_title),
476476 description = getLocalizedString(R .string.settings_expert_description),
477477 iconRes = R .drawable.ic_experimental,
478478 titleFontSize = titleFontSize,
479479 descriptionFontSize = descriptionFontSize,
480480 iconSize = iconSize,
481- onClick = { currentScreen = " expert" },
481+ onClick = { currentScreen = " expert" }
482482 )
483483 }
484484
@@ -491,6 +491,18 @@ class SettingsFragment : BaseFragment() {
491491 descriptionFontSize = descriptionFontSize,
492492 iconSize = iconSize,
493493 onClick = { currentScreen = " about" },
494+ enableMultiClick = true ,
495+ onMultiClick = { count ->
496+ if (! prefs.enableExpertOptions) {
497+ if (count in 2 .. 4 ) {
498+ showInstantToast(getLocalizedString(R .string.expert_options_tap_hint, count))
499+ } else if (count == 5 ) {
500+ showInstantToast(getLocalizedString(R .string.expert_options_unlocked))
501+ toggledExpertOptions = ! prefs.enableExpertOptions
502+ prefs.enableExpertOptions = toggledExpertOptions
503+ }
504+ }
505+ }
494506 )
495507
496508 if (isGestureNavigationEnabled(context)) {
@@ -639,7 +651,7 @@ class SettingsFragment : BaseFragment() {
639651 toggledHideSearchView = ! prefs.hideSearchView
640652 prefs.hideSearchView = toggledHideSearchView
641653
642- if (prefs.hideSearchView ) {
654+ if (toggledHideSearchView ) {
643655 toggledAutoShowKeyboard = false
644656 prefs.autoShowKeyboard = toggledAutoShowKeyboard
645657 }
@@ -864,7 +876,7 @@ class SettingsFragment : BaseFragment() {
864876 }
865877 )
866878
867- if (prefs.homePagesNum > 1 ) {
879+ if (selectedHomePagesNum > 1 ) {
868880 SettingsSwitch (
869881 text = getLocalizedString(R .string.enable_home_pager),
870882 fontSize = titleFontSize,
@@ -2529,18 +2541,6 @@ class SettingsFragment : BaseFragment() {
25292541 Process .myUserHandle(),
25302542 BuildConfig .APPLICATION_ID
25312543 )
2532- },
2533- enableMultiClick = true ,
2534- onMultiClick = { count ->
2535- if (! prefs.enableExpertOptions) {
2536- if (count in 2 .. 4 ) {
2537- showInstantToast(getLocalizedString(R .string.expert_options_tap_hint, count))
2538- } else if (count == 5 ) {
2539- showInstantToast(getLocalizedString(R .string.expert_options_unlocked))
2540- toggledExpertOptions = ! prefs.enableExpertOptions
2541- prefs.enableExpertOptions = toggledExpertOptions
2542- }
2543- }
25442544 }
25452545 )
25462546
0 commit comments