Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix messages not shown + improve unread marker behavior #4390

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rename pair to triple
Signed-off-by: Marcel Hibbe <[email protected]>
mahibi committed Nov 5, 2024

Verified

This commit was signed with the committer’s verified signature.
mahibi Marcel Hibbe
commit ff9055252755ac312d55dfec640bd314dcc6bf39
Original file line number Diff line number Diff line change
@@ -285,8 +285,8 @@ class OfflineFirstChatRepository @Inject constructor(
val weHaveMessagesFromOurself = chatMessages.any { it.actorId == currentUser.userId }
showUnreadMessagesMarker = showUnreadMessagesMarker && !weHaveMessagesFromOurself

val pair = Triple(true, showUnreadMessagesMarker, chatMessages)
_messageFlow.emit(pair)
val triple = Triple(true, showUnreadMessagesMarker, chatMessages)
_messageFlow.emit(triple)
} else {
Log.d(TAG, "resultsFromSync are null or empty")
}
@@ -684,8 +684,8 @@ class OfflineFirstChatRepository @Inject constructor(
)

if (list.isNotEmpty()) {
val pair = Triple(false, false, list)
_messageFlow.emit(pair)
val triple = Triple(false, false, list)
_messageFlow.emit(triple)
}
}

@@ -710,8 +710,8 @@ class OfflineFirstChatRepository @Inject constructor(
)

if (list.isNotEmpty()) {
val pair = Triple(false, false, list)
_messageFlow.emit(pair)
val triple = Triple(false, false, list)
_messageFlow.emit(triple)
}
}