feat: replace hardcoded with const string

This commit is contained in:
Harris 2021-09-02 10:21:14 +10:00
parent ded0370e8e
commit adeffbdc07

View File

@ -80,6 +80,7 @@ object TextSecurePreferences {
const val UNIVERSAL_UNIDENTIFIED_ACCESS = "pref_universal_unidentified_access"
const val TYPING_INDICATORS = "pref_typing_indicators"
const val LINK_PREVIEWS = "pref_link_previews"
private const val GIF_METADATA_WARNING = "has_seen_gif_metadata_warning"
private const val GIF_GRID_LAYOUT = "pref_gif_grid_layout"
const val IS_USING_FCM = "pref_is_using_fcm"
private const val FCM_TOKEN = "pref_fcm_token"
@ -287,12 +288,12 @@ object TextSecurePreferences {
@JvmStatic
fun hasSeenGIFMetaDataWarning(context: Context): Boolean {
return getBooleanPreference(context, "has_seen_gif_metadata_warning", false)
return getBooleanPreference(context, GIF_METADATA_WARNING, false)
}
@JvmStatic
fun setHasSeenGIFMetaDataWarning(context: Context) {
setBooleanPreference(context, "has_seen_gif_metadata_warning", true)
setBooleanPreference(context, GIF_METADATA_WARNING, true)
}
@JvmStatic