mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-23 08:27:30 +00:00
Fix old threads being set to 2 weeks ago
This commit is contained in:
parent
19c3b639c3
commit
d143d8a883
@ -1181,14 +1181,13 @@ open class Storage(
|
|||||||
profileManager.setProfilePicture(context, recipient, null, null)
|
profileManager.setProfilePicture(context, recipient, null, null)
|
||||||
}
|
}
|
||||||
if (contact.priority == PRIORITY_HIDDEN) {
|
if (contact.priority == PRIORITY_HIDDEN) {
|
||||||
getThreadId(fromSerialized(contact.id))?.let { conversationThreadId ->
|
getThreadId(fromSerialized(contact.id))?.let(::deleteConversation)
|
||||||
deleteConversation(conversationThreadId)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
getOrCreateThreadIdFor(fromSerialized(contact.id)).let { conversationThreadId ->
|
(
|
||||||
setPinned(conversationThreadId, contact.priority == PRIORITY_PINNED)
|
getThreadId(address) ?: getOrCreateThreadIdFor(address).also {
|
||||||
setThreadDate(conversationThreadId, SnodeAPI.nowWithOffset - 14.days.inWholeMilliseconds)
|
setThreadDate(it, SnodeAPI.nowWithOffset - 14.days.inWholeMilliseconds)
|
||||||
}
|
}
|
||||||
|
).also { setPinned(it, contact.priority == PRIORITY_PINNED) }
|
||||||
}
|
}
|
||||||
getThreadId(recipient)?.let {
|
getThreadId(recipient)?.let {
|
||||||
setExpirationConfiguration(
|
setExpirationConfiguration(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user