From b97ab1d795a974385d41ec9454c737f340ab1c9c Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 30 Mar 2018 23:39:00 +0200 Subject: [PATCH] notify some users about the Clock app --- .../gallery/activities/MainActivity.kt | 11 ++++++----- .../simplemobiletools/gallery/helpers/Constants.kt | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 76614616a..80a18ec28 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -14,6 +14,7 @@ import android.view.ViewGroup import android.widget.FrameLayout import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog +import com.simplemobiletools.commons.dialogs.NewAppDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.PERMISSION_READ_STORAGE @@ -42,7 +43,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { private val PICK_MEDIA = 2 private val PICK_WALLPAPER = 3 private val LAST_MEDIA_CHECK_PERIOD = 3000L - private val CONTACTS_PACKAGE = "com.simplemobiletools.contacts" + private val NEW_APP_PACKAGE = "com.simplemobiletools.clock" lateinit var mDirs: ArrayList @@ -101,11 +102,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { mIsPasswordProtectionPending = config.appPasswordProtectionOn setupLatestMediaId() - // notify the users about the Contacts app - /*if (System.currentTimeMillis() < 1521015000000 && !config.wasNewAppShown && config.appRunCount > 100 && config.appRunCount % 50 != 0 && !isPackageInstalled(CONTACTS_PACKAGE)) { + // notify some users about the Clock app + if (System.currentTimeMillis() < 1523750400000 && !config.wasNewAppShown && config.appRunCount > 100 && config.appRunCount % 50 != 0 && !isPackageInstalled(NEW_APP_PACKAGE)) { config.wasNewAppShown = true - NewAppDialog(this, CONTACTS_PACKAGE, "Simple Contacts") - }*/ + NewAppDialog(this, NEW_APP_PACKAGE, "Simple Clock") + } } override fun onStart() { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt index cf49ee2f3..005222b09 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt @@ -47,7 +47,7 @@ const val ONE_FINGER_ZOOM = "one_finger_zoom" const val ALLOW_INSTANT_CHANGE = "allow_instant_change" const val REPLACE_ZOOMABLE_IMAGES = "replace_zoomable_images" const val DO_EXTRA_CHECK = "do_extra_check" -const val WAS_NEW_APP_SHOWN = "was_new_app_shown" +const val WAS_NEW_APP_SHOWN = "was_new_app_shown_clock" // slideshow const val SLIDESHOW_INTERVAL = "slideshow_interval"