mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 12:37:26 +00:00
Making sure restored accounts do not display deleted messages
When getting messages we check if the contact was marked as hidden and compare the timestamps of both the message and the config object to check whether to re-show the thread or not.
This commit is contained in:
@@ -196,6 +196,18 @@ class ConfigFactory(
|
||||
}
|
||||
}
|
||||
|
||||
override fun getConfigTimestamp(forConfigObject: ConfigBase, publicKey: String): Long {
|
||||
val variant = when (forConfigObject) {
|
||||
is UserProfile -> SharedConfigMessage.Kind.USER_PROFILE.name
|
||||
is Contacts -> SharedConfigMessage.Kind.CONTACTS.name
|
||||
is ConversationVolatileConfig -> SharedConfigMessage.Kind.CONVO_INFO_VOLATILE.name
|
||||
is UserGroupsConfig -> SharedConfigMessage.Kind.GROUPS.name
|
||||
else -> throw UnsupportedOperationException("Can't support type of ${forConfigObject::class.simpleName} yet")
|
||||
}
|
||||
|
||||
return configDatabase.retrieveConfigLastUpdateTimestamp(variant, publicKey)
|
||||
}
|
||||
|
||||
override fun conversationInConfig(
|
||||
publicKey: String?,
|
||||
groupPublicKey: String?,
|
||||
|
Reference in New Issue
Block a user