only handle the first configuration message

This commit is contained in:
Ryan ZHAO
2021-02-09 17:00:17 +11:00
parent e8d007dce4
commit 6b45cc683e
3 changed files with 13 additions and 2 deletions

View File

@@ -131,6 +131,7 @@ object TextSecurePreferences {
// region Multi Device
private const val IS_USING_MULTI_DEVICE = "pref_is_using_multi_device"
private const val LAST_CONFIGURATION_SYNC_TIME = "pref_last_configuration_sync_time"
private const val CONFIGURATION_SYNCED = "pref_configuration_synced"
@JvmStatic
fun isUsingMultiDevice(context: Context): Boolean {
@@ -152,6 +153,16 @@ object TextSecurePreferences {
setLongPreference(context, LAST_CONFIGURATION_SYNC_TIME, value)
}
@JvmStatic
fun getConfigurationMessageSynced(context: Context): Boolean {
return getBooleanPreference(context, CONFIGURATION_SYNCED, false)
}
@JvmStatic
fun setConfigurationMessageSynced(context: Context, value: Boolean) {
setBooleanPreference(context, CONFIGURATION_SYNCED, value)
}
@JvmStatic
fun isUsingFCM(context: Context): Boolean {
return getBooleanPreference(context, IS_USING_FCM, false)