mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 20:45:17 +00:00
wip: maybe the volatile is being updated with 0 on batch message receive?
This commit is contained in:
parent
a15842166c
commit
df39194024
@ -496,6 +496,8 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
|
|||||||
|
|
||||||
private fun updateConvoVolatile(convos: ConversationVolatileConfig) {
|
private fun updateConvoVolatile(convos: ConversationVolatileConfig) {
|
||||||
val extracted = convos.all()
|
val extracted = convos.all()
|
||||||
|
Log.d("Loki-DBG", "All conversations")
|
||||||
|
Log.d("Loki-DBG", convos.allCommunities().joinToString("\n"))
|
||||||
for (conversation in extracted) {
|
for (conversation in extracted) {
|
||||||
val threadId = when (conversation) {
|
val threadId = when (conversation) {
|
||||||
is Conversation.OneToOne -> getThreadIdFor(conversation.sessionId, null, null, createThread = false)
|
is Conversation.OneToOne -> getThreadIdFor(conversation.sessionId, null, null, createThread = false)
|
||||||
@ -1046,6 +1048,7 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
|
|||||||
markConversationAsRead(threadId, volatile.lastRead, force = true)
|
markConversationAsRead(threadId, volatile.lastRead, force = true)
|
||||||
Log.d("Loki-DBG", "set latest volatile read for $room to ${volatile.lastRead}")
|
Log.d("Loki-DBG", "set latest volatile read for $room to ${volatile.lastRead}")
|
||||||
}
|
}
|
||||||
|
volatileConfig.set(volatile)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hasBackgroundGroupAddJob(groupJoinUrl: String): Boolean {
|
override fun hasBackgroundGroupAddJob(groupJoinUrl: String): Boolean {
|
||||||
|
@ -229,7 +229,7 @@ class BatchMessageReceiveJob(
|
|||||||
if (!openGroupID.isNullOrEmpty()) {
|
if (!openGroupID.isNullOrEmpty()) {
|
||||||
Log.d("Loki-DBG", "new-lastSeen for: $openGroupID is $currentLastSeen")
|
Log.d("Loki-DBG", "new-lastSeen for: $openGroupID is $currentLastSeen")
|
||||||
}
|
}
|
||||||
storage.markConversationAsRead(threadId, newLastSeen)
|
storage.markConversationAsRead(threadId, newLastSeen, force = true)
|
||||||
storage.updateThread(threadId, true)
|
storage.updateThread(threadId, true)
|
||||||
SSKEnvironment.shared.notificationManager.updateNotification(context, threadId)
|
SSKEnvironment.shared.notificationManager.updateNotification(context, threadId)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user