-
Notifications
You must be signed in to change notification settings - Fork 79
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/10150/chat marked as read without seeing all messages #10151
Fix/10150/chat marked as read without seeing all messages #10151
Conversation
…OADED - it describes the intention a bit better
Jenkins Builds
|
@@ -678,6 +678,7 @@ method resendChatMessage*(self: Module, messageId: string): string = | |||
return self.controller.resendChatMessage(messageId) | |||
|
|||
method resetNewMessagesMarker*(self: Module) = | |||
self.view.setFirstUnseenMessageLoaded(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should not reset it.
If you'll set it to false, loadingMessagesView will be showing, which is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mprakhov, I think it's the intention to show the loading
view 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that we want to show loading messages view when we are waiting for a setFirstUnseenMessageLoaded signal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understand, according to the following logic, it is desired behavior.
status-desktop/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml
Lines 166 to 167 in 34c04f0
readonly property bool show: !messageStore.firstUnseenMessageLoaded || | |
!messageStore.initialMessagesLoaded |
Could you please elaborate on what use case it breaks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to test, when you are scrolling up the chat, and receiving a new message (in order new messages marker appeared). Will you UI flick with loading state or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavior is desired on the first chat opening because the backend needs to load the initial message data. When it is loaded, no cense in this UI, all chats will be opened and rendered quickly
@@ -678,6 +678,7 @@ method resendChatMessage*(self: Module, messageId: string): string = | |||
return self.controller.resendChatMessage(messageId) | |||
|
|||
method resetNewMessagesMarker*(self: Module) = | |||
self.view.setFirstUnseenMessageLoaded(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mprakhov, I think it's the intention to show the loading
view 🤔
@osmaczko , the behaviour is definitely improved. I've noted that when the messages have not all been read and then the app is restarted the chat is loading at the very bottom message, immediately causing the marker to be cleared. What do you think, does that need addressed as part of this issue? 2023-04-05_14-34-27.1.mp42023-04-05_14-44-56.mp4 |
Could you please check if this behavior is reproducible on current master/0.11.0 RC2? If yes, please create separate issue and assign it to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @osmaczko . Can you open the same PR on top of the release branch? Thanks |
- new messages marker is reevaluated only if chat has unviewed messages - loading state is reevaluated only when chat is made active, this fixes case described here: #10151 (comment) fixes: #10275
- new messages marker is reevaluated only if chat has unviewed messages - loading state is reevaluated only when chat is made active, this fixes case described here: #10151 (comment) fixes: #10275
fixes: #10150