only handle the first configuration message

This commit is contained in:
ryanzhao
2021-02-10 09:37:20 +11:00
parent c2836cc654
commit 9cf292589b
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)