From 5eb825b1013b1c605bc588ff8e6d67fec84d8d76 Mon Sep 17 00:00:00 2001 From: Mahdi Hosseinzadeh Date: Thu, 13 Jun 2024 19:44:44 +0330 Subject: [PATCH] Update app preferences keys --- .../ir/mahozad/cutcon/model/Prefereces.kt | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/ir/mahozad/cutcon/model/Prefereces.kt b/src/main/kotlin/ir/mahozad/cutcon/model/Prefereces.kt index 105af4a..a3ada37 100644 --- a/src/main/kotlin/ir/mahozad/cutcon/model/Prefereces.kt +++ b/src/main/kotlin/ir/mahozad/cutcon/model/Prefereces.kt @@ -1,14 +1,17 @@ package ir.mahozad.cutcon.model +import ir.mahozad.cutcon.BuildConfig + object PreferenceKeys { - const val PREF_THEME = "theme" - const val PREF_LANGUAGE = "language" - const val PREF_CALENDAR = "calendar" - const val PREF_ASPECT_RATIO = "aspect-ratio" - const val PREF_FINISH_SOUND = "finish-sound" - const val PREF_INTERLACED_FIX = "interlaced-fix" - const val PREF_SCREENSHOT_SOUND = "screenshot-sound" - const val PREF_LAST_OPEN_DIRECTORY = "last-open-directory" - const val PREF_LAST_SAVE_DIRECTORY = "last-save-directory" - const val PREF_LAST_SHOWN_CHANGELOG_VERSION = "last-shown-changelog-version" + // The app name has been added as prefix because other apps with same keys will conflict with these + const val PREF_THEME = "${BuildConfig.APP_NAME}-theme" + const val PREF_LANGUAGE = "${BuildConfig.APP_NAME}-language" + const val PREF_CALENDAR = "${BuildConfig.APP_NAME}-calendar" + const val PREF_ASPECT_RATIO = "${BuildConfig.APP_NAME}-aspect-ratio" + const val PREF_FINISH_SOUND = "${BuildConfig.APP_NAME}-finish-sound" + const val PREF_INTERLACED_FIX = "${BuildConfig.APP_NAME}-interlaced-fix" + const val PREF_SCREENSHOT_SOUND = "${BuildConfig.APP_NAME}-screenshot-sound" + const val PREF_LAST_OPEN_DIRECTORY = "${BuildConfig.APP_NAME}-last-open-directory" + const val PREF_LAST_SAVE_DIRECTORY = "${BuildConfig.APP_NAME}-last-save-directory" + const val PREF_LAST_SHOWN_CHANGELOG_VERSION = "${BuildConfig.APP_NAME}-last-shown-changelog-version" }