Эх сурвалжийг харах

ktlint Format

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
sowjanyakch 7 сар өмнө
parent
commit
082669a3bf

+ 8 - 13
app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt

@@ -2546,19 +2546,14 @@ class ChatActivity :
 
 
     private fun isScrolledToBottom() = layoutManager?.findFirstVisibleItemPosition() == 0
     private fun isScrolledToBottom() = layoutManager?.findFirstVisibleItemPosition() == 0
 
 
-    private fun shouldInsertNewMessagesNotice(
+    private fun shouldInsertNewMessagesNotice(newMessagesAvailable: Boolean, chatMessageList: List<ChatMessage>) =
-        newMessagesAvailable: Boolean,
+        if (newMessagesAvailable) {
-        chatMessageList: List<ChatMessage>
+            chatMessageList.any { it.actorId != conversationUser!!.userId }
-    ) = if (newMessagesAvailable) {
+        } else {
-        chatMessageList.any { it.actorId != conversationUser!!.userId }
+            false
-    } else {
+        }
-        false
+
-    }
+    private fun updateUnreadMessageInfos(chatMessageList: List<ChatMessage>, scrollToEndOnUpdate: Boolean) {
-
-    private fun updateUnreadMessageInfos(
-        chatMessageList: List<ChatMessage>,
-        scrollToEndOnUpdate: Boolean
-    ) {
         val unreadChatMessage = ChatMessage()
         val unreadChatMessage = ChatMessage()
         unreadChatMessage.jsonMessageId = -1
         unreadChatMessage.jsonMessageId = -1
         unreadChatMessage.actorId = "-1"
         unreadChatMessage.actorId = "-1"