From 8bd3c60733d39ce210ea2b97f6bb24e710656b31 Mon Sep 17 00:00:00 2001 From: Diogo Date: Sun, 22 Sep 2024 11:51:05 +0100 Subject: [PATCH] remove log --- .../kotlin/chat/simplex/common/views/chat/ChatView.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt index 62365e1957..091d91d1a4 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt @@ -1901,7 +1901,7 @@ private fun handleForwardConfirmation( private fun getItemSeparation(chatItem: ChatItem, prevItem: ChatItem?, nextItem: ChatItem?): ItemSeparation { if (prevItem == null) { - return ItemSeparation( + return ItemSeparation( timestamp = true, largeGap = false, date = chatItem.meta.itemTs, @@ -1909,20 +1909,17 @@ private fun getItemSeparation(chatItem: ChatItem, prevItem: ChatItem?, nextItem: } if (nextItem == null) { - return ItemSeparation( + return ItemSeparation( timestamp = true, largeGap = false, date = if (getTimestampDateText(chatItem.meta.itemTs) != getTimestampDateText(prevItem.meta.itemTs)) chatItem.meta.itemTs else null ) } - val sameMemberAndDirection = if (nextItem.chatDir is GroupRcv && chatItem.chatDir is GroupRcv) { chatItem.chatDir.groupMember.groupMemberId == nextItem.chatDir.groupMember.groupMemberId } else chatItem.chatDir.sent == nextItem.chatDir.sent val largeGap = !sameMemberAndDirection || (abs(nextItem.meta.createdAt.epochSeconds - chatItem.meta.createdAt.epochSeconds) >= 60) - Log.e(TAG, "getItemSeparation: next: ${nextItem.text} prev: ${prevItem.text} curr: ${chatItem.text}") - return ItemSeparation( timestamp = largeGap || nextItem.meta.timestampText != chatItem.meta.timestampText, largeGap = largeGap,