diff --git a/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/SettingsActivity.kt index 54e0693..609a876 100644 --- a/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/thankyou/activities/SettingsActivity.kt @@ -4,6 +4,7 @@ import android.content.ComponentName import android.content.pm.PackageManager import android.os.Bundle import com.simplemobiletools.commons.activities.BaseSimpleActivity +import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.extensions.updateTextColors import com.simplemobiletools.thankyou.R import com.simplemobiletools.thankyou.extensions.config @@ -33,12 +34,22 @@ class SettingsActivity : BaseSimpleActivity() { private fun setupHideLauncherIcon() { settings_hide_launcher_icon.isChecked = config.hideLauncherIcon settings_hide_launcher_icon_holder.setOnClickListener { - settings_hide_launcher_icon.toggle() - config.hideLauncherIcon = settings_hide_launcher_icon.isChecked - - val componentName = ComponentName(this, SplashActivity::class.java) - val state = if (config.hideLauncherIcon) PackageManager.COMPONENT_ENABLED_STATE_DISABLED else PackageManager.COMPONENT_ENABLED_STATE_ENABLED - packageManager.setComponentEnabledSetting(componentName, state, PackageManager.DONT_KILL_APP) + if (config.hideLauncherIcon) { + toggleHideLauncherIcon() + } else { + ConfirmationDialog(this, "", R.string.hide_launcher_icon_explanation, R.string.ok, R.string.cancel) { + toggleHideLauncherIcon() + } + } } } + + private fun toggleHideLauncherIcon() { + settings_hide_launcher_icon.toggle() + config.hideLauncherIcon = settings_hide_launcher_icon.isChecked + + val componentName = ComponentName(this, SplashActivity::class.java) + val state = if (config.hideLauncherIcon) PackageManager.COMPONENT_ENABLED_STATE_DISABLED else PackageManager.COMPONENT_ENABLED_STATE_ENABLED + packageManager.setComponentEnabledSetting(componentName, state, PackageManager.DONT_KILL_APP) + } } diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 721f249..583e193 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index f72f784..2ef4967 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index f72f784..2ef4967 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index f72f784..2ef4967 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index f72f784..2ef4967 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index d0830a6..72c2797 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index f72f784..2ef4967 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index a33148f..fda0f95 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index e03c2cf..e492dd4 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index a5e0548..07d76d1 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 7c402ef..967e900 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -1,10 +1,11 @@ Jednoduché ďakujem Ďakujem - Ďakujem za našu podporu!\nNapíšte nám na \n hello@simplemobiletools.com,\n chceme počuť každú spätnú väzbu a odporúčania.\n\n(Prosím ponechajte si aplikáciu nainštalovanú aspoň 1 deň, predídete tak automatickému vráteniu peňazí) + Ďakujem za vašu podporu!\nNapíšte nám na \n hello@simplemobiletools.com,\n chceme počuť každú spätnú väzbu a odporúčania.\n\n(Prosím ponechajte si aplikáciu nainštalovanú aspoň 1 deň, predídete tak automatickému vráteniu peňazí) Skryť spúšťaciu ikonku + Na opätovné zobrazenie ikonky budete musieť preinštalovať apku. Nebojte sa, už nebudete musieť platiť. diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 0d4705f..f214174 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index f72f784..2ef4967 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f72f784..2ef4967 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,6 +5,7 @@ Hide the launcher icon + To have the launcher icon displayed again, you will have to reinstall the app. Don\'t worry, you won\'t have to pay again.