From 59b4ce2474b0496e800a63c343196016341b37da Mon Sep 17 00:00:00 2001 From: JRoberts <8711996+jr-simplex@users.noreply.github.com> Date: Wed, 21 Sep 2022 17:39:29 +0400 Subject: [PATCH] mobile: decrease mark read delay (#1085) --- .../app/src/main/java/chat/simplex/app/views/chat/ChatView.kt | 2 +- apps/ios/Shared/Views/Chat/ChatView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/chat/ChatView.kt b/apps/android/app/src/main/java/chat/simplex/app/views/chat/ChatView.kt index 695a8148e1..7453bdd6ae 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/chat/ChatView.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/chat/ChatView.kt @@ -569,7 +569,7 @@ fun BoxWithConstraintsScope.ChatItemsList( if (cItem.isRcvNew) { LaunchedEffect(cItem.id) { scope.launch { - delay(750) + delay(600) markRead(CC.ItemRange(cItem.id, cItem.id), null) } } diff --git a/apps/ios/Shared/Views/Chat/ChatView.swift b/apps/ios/Shared/Views/Chat/ChatView.swift index 63368ecf48..f2515499ab 100644 --- a/apps/ios/Shared/Views/Chat/ChatView.swift +++ b/apps/ios/Shared/Views/Chat/ChatView.swift @@ -215,7 +215,7 @@ struct ChatView: View { itemsInView.insert(ci.viewId) loadChatItems(cInfo, ci, proxy) if ci.isRcvNew() { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.75) { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.6) { if chatModel.chatId == cInfo.id && itemsInView.contains(ci.viewId) { Task { await apiMarkChatItemRead(cInfo, ci)