Loading commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt +7 −2 Original line number Diff line number Diff line Loading @@ -82,10 +82,15 @@ fun Activity.appLaunched() { baseConfig.internalStoragePath = getInternalStoragePath() updateSDCardPath() baseConfig.appRunCount++ if (!isThankYouInstalled() && (baseConfig.appRunCount % 50 == 0)) { if (!baseConfig.hadThankYouInstalled) { if (isThankYouInstalled()) { baseConfig.hadThankYouInstalled = true } else if (baseConfig.appRunCount % 50 == 0) { DonateDialog(this) } } } @SuppressLint("InlinedApi") fun Activity.isShowingSAFDialog(path: String, treeUri: String, requestCode: Int): Boolean { Loading commons/src/main/kotlin/com/simplemobiletools/commons/helpers/BaseConfig.kt +4 −0 Original line number Diff line number Diff line Loading @@ -155,4 +155,8 @@ open class BaseConfig(val context: Context) { var sorting: Int get() = prefs.getInt(SORT_ORDER, context.resources.getInteger(R.integer.default_sorting)) set(sorting) = prefs.edit().putInt(SORT_ORDER, sorting).apply() var hadThankYouInstalled: Boolean get() = prefs.getBoolean(HAD_THANK_YOU_INSTALLED, false) set(hadThankYouInstalled) = prefs.edit().putBoolean(HAD_THANK_YOU_INSTALLED, hadThankYouInstalled).apply() } commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ const val SHOW_INFO_BUBBLE = "show_info_bubble" const val LAST_CONFLICT_RESOLUTION = "last_conflict_resolution" const val LAST_CONFLICT_APPLY_TO_ALL = "last_conflict_apply_to_all" const val AVOID_WHATS_NEW = "avoid_whats_new" const val HAD_THANK_YOU_INSTALLED = "had_thank_you_installed" // licenses const val LICENSE_KOTLIN = 1 Loading Loading
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt +7 −2 Original line number Diff line number Diff line Loading @@ -82,10 +82,15 @@ fun Activity.appLaunched() { baseConfig.internalStoragePath = getInternalStoragePath() updateSDCardPath() baseConfig.appRunCount++ if (!isThankYouInstalled() && (baseConfig.appRunCount % 50 == 0)) { if (!baseConfig.hadThankYouInstalled) { if (isThankYouInstalled()) { baseConfig.hadThankYouInstalled = true } else if (baseConfig.appRunCount % 50 == 0) { DonateDialog(this) } } } @SuppressLint("InlinedApi") fun Activity.isShowingSAFDialog(path: String, treeUri: String, requestCode: Int): Boolean { Loading
commons/src/main/kotlin/com/simplemobiletools/commons/helpers/BaseConfig.kt +4 −0 Original line number Diff line number Diff line Loading @@ -155,4 +155,8 @@ open class BaseConfig(val context: Context) { var sorting: Int get() = prefs.getInt(SORT_ORDER, context.resources.getInteger(R.integer.default_sorting)) set(sorting) = prefs.edit().putInt(SORT_ORDER, sorting).apply() var hadThankYouInstalled: Boolean get() = prefs.getBoolean(HAD_THANK_YOU_INSTALLED, false) set(hadThankYouInstalled) = prefs.edit().putBoolean(HAD_THANK_YOU_INSTALLED, hadThankYouInstalled).apply() }
commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ const val SHOW_INFO_BUBBLE = "show_info_bubble" const val LAST_CONFLICT_RESOLUTION = "last_conflict_resolution" const val LAST_CONFLICT_APPLY_TO_ALL = "last_conflict_apply_to_all" const val AVOID_WHATS_NEW = "avoid_whats_new" const val HAD_THANK_YOU_INSTALLED = "had_thank_you_installed" // licenses const val LICENSE_KOTLIN = 1 Loading