From c35e7554887beeeac24c5c9cfb9bb805fa0b5cf8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 16 May 2020 19:51:46 +0200 Subject: [PATCH] show a dialog about new apps to some users --- .../camera/activities/MainActivity.kt | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt index d8d0b143..5b47b0d9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -21,6 +21,7 @@ import com.simplemobiletools.camera.implementations.MyCameraImpl import com.simplemobiletools.camera.interfaces.MyPreview import com.simplemobiletools.camera.views.CameraPreview import com.simplemobiletools.camera.views.FocusCircleView +import com.simplemobiletools.commons.dialogs.NewAppsIconsDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.Release @@ -61,6 +62,12 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener { supportActionBar?.hide() checkWhatsNewDialog() setupOrientationEventListener() + + // notify some users about the SMS Messenger and Voice Recorder apps + if (!config.wasMessengerRecorderShown && config.appRunCount > 35) { + NewAppsIconsDialog(this) + config.wasMessengerRecorderShown = true + } } override fun onResume() { @@ -373,14 +380,14 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener { runOnUiThread { if (!isDestroyed) { val options = RequestOptions() - .centerCrop() - .diskCacheStrategy(DiskCacheStrategy.NONE) + .centerCrop() + .diskCacheStrategy(DiskCacheStrategy.NONE) Glide.with(this) - .load(mPreviewUri) - .apply(options) - .transition(DrawableTransitionOptions.withCrossFade()) - .into(last_photo_video_preview) + .load(mPreviewUri) + .apply(options) + .transition(DrawableTransitionOptions.withCrossFade()) + .into(last_photo_video_preview) } } }