diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt index 51278b70d5..37988c285f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt @@ -496,8 +496,6 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co private fun updateConvoVolatile(convos: ConversationVolatileConfig) { val extracted = convos.all() - Log.d("Loki-DBG", "All conversations") - Log.d("Loki-DBG", convos.allCommunities().joinToString("\n")) for (conversation in extracted) { val threadId = when (conversation) { is Conversation.OneToOne -> getThreadIdFor(conversation.sessionId, null, null, createThread = false) @@ -551,7 +549,6 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co toAddCommunities.forEach { toAddCommunity -> val joinUrl = toAddCommunity.community.fullUrl() if (!hasBackgroundGroupAddJob(joinUrl)) { - Log.d("Loki-DBG", "Adding background $joinUrl") JobQueue.shared.add(BackgroundGroupAddJob(joinUrl)) } } @@ -1033,7 +1030,6 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co override fun onOpenGroupAdded(server: String, room: String) { OpenGroupManager.restartPollerForServer(server.removeSuffix("/")) - Log.d("Loki-DBG", "Checking onOpenGroupAdded: $server $room") val groups = configFactory.userGroups ?: return val volatileConfig = configFactory.convoVolatile ?: return val openGroup = getOpenGroup(room, server) ?: return @@ -1042,11 +1038,9 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co val communityInfo = groups.getOrConstructCommunityInfo(infoServer, infoRoom, pubKeyHex) groups.set(communityInfo) val volatile = volatileConfig.getOrConstructCommunity(infoServer, infoRoom, pubKey) - Log.d("Loki-DBG", "latest volatile read for $room is ${volatile.lastRead}") if (volatile.lastRead != 0L) { val threadId = getThreadId(openGroup) ?: return markConversationAsRead(threadId, volatile.lastRead, force = true) - Log.d("Loki-DBG", "set latest volatile read for $room to ${volatile.lastRead}") } volatileConfig.set(volatile) } diff --git a/libsession/src/main/java/org/session/libsession/messaging/jobs/BackgroundGroupAddJob.kt b/libsession/src/main/java/org/session/libsession/messaging/jobs/BackgroundGroupAddJob.kt index 2dd86bd584..20442e5594 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/jobs/BackgroundGroupAddJob.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/jobs/BackgroundGroupAddJob.kt @@ -28,7 +28,6 @@ class BackgroundGroupAddJob(val joinUrl: String): Job { } override suspend fun execute(dispatcherName: String) { - Log.d("Loki-DBG", "adding group $joinUrl") try { val openGroup = OpenGroupUrlParser.parseUrl(joinUrl) val storage = MessagingModuleConfiguration.shared.storage @@ -39,8 +38,6 @@ class BackgroundGroupAddJob(val joinUrl: String): Job { return } storage.addOpenGroup(openGroup.joinUrl()) - Log.d(KEY, "onOpenGroupAdded(${openGroup.server})") - Log.d("Loki-DBG", "added group $joinUrl") storage.onOpenGroupAdded(openGroup.server, openGroup.room) } catch (e: Exception) { Log.e("OpenGroupDispatcher", "Failed to add group because",e) diff --git a/libsession/src/main/java/org/session/libsession/messaging/jobs/BatchMessageReceiveJob.kt b/libsession/src/main/java/org/session/libsession/messaging/jobs/BatchMessageReceiveJob.kt index 2d471c5b2d..59bc927245 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/jobs/BatchMessageReceiveJob.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/jobs/BatchMessageReceiveJob.kt @@ -147,9 +147,6 @@ class BatchMessageReceiveJob( val messageIds = linkedMapOf>() val myLastSeen = storage.getLastSeen(threadId) var newLastSeen = if (myLastSeen == -1L) 0 else myLastSeen - if (!openGroupID.isNullOrEmpty()) { - Log.d("Loki-DBG", "pre-lastSeen for: $openGroupID is $newLastSeen") - } messages.forEach { (parameters, message, proto) -> try { when (message) { @@ -220,15 +217,9 @@ class BatchMessageReceiveJob( // last seen will be the current last seen if not changed (re-computes the read counts for thread record) // might have been updated from a different thread at this point val currentLastSeen = storage.getLastSeen(threadId).let { if (it == -1L) 0 else it } - if (!openGroupID.isNullOrEmpty()) { - Log.d("Loki-DBG", "current-lastSeen (w/ my message read) for: $openGroupID is $currentLastSeen") - } if (currentLastSeen > newLastSeen) { newLastSeen = currentLastSeen } - if (!openGroupID.isNullOrEmpty()) { - Log.d("Loki-DBG", "new-lastSeen for: $openGroupID is $currentLastSeen") - } if (newLastSeen > 0) { storage.markConversationAsRead(threadId, newLastSeen, force = true) storage.updateThread(threadId, true)