-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve mark-seen-logic #271
Conversation
343a64b
to
b3d0264
Compare
- Test not actually working currently, it was just manual check. - Would be quite cumbersome automated test, to wait
- Also fix selectors unseen check: check all messages, not just last message
- If we are fetching older messages for buddy, then keep fetching until oldest is not unread
- It is possible that InitialMessages should spawn new requests for fetching messages. - For example Mr. A has sent Mr. B 23 messages. If B fetches initially 10, it should also fetch the 13 unread!
- Its safer that way, and also it is fine
2d1fca6
to
bce0eaa
Compare
- if A sends B 20 messages, then when B opens app, B wants to load all unread messages - readd test for deleted user as recent chat
bce0eaa
to
447ac73
Compare
- Fix the logic of the test
|
||
const getPreviousMessagesIfNotLoading = () => { | ||
if (isLoading) { | ||
if (isLoading || messageList.length < messageApi.MAX_MESSAGES_AT_ONCE) { |
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.
What happens here?
Why we do nothing if len is less than max messages at once?
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.
If there is under that many messages, we dont want to fetch older messages.
There can only be older messages if there is more than the fetch amount.
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.
Taa ei oo mulle ilmiselvaa et taa on oikein mut salee on :D, jos oot varma et menee oikein ni sit fine!
Must tuntu et tas on joku edge case mut ei kyl valtsiin oo
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.
Probably proper good
I did not get why we do nothing if len is less than 10 with messages gottten on UI layer.
To me that feels more like API related decision that should not be done on rendering layer. There is not enough context to understand WHY on the UI code part.
I would like to understand WHY we do that check?
LGTM otherwise
What has changed?
a) received oldest message is not unread
b) received all messages
Bonus:
User-report e2e-test was broken, so at the same time when fixed, I added a fix for this: https://trello.com/c/zYeyhfCO/936-keyboardavoider-to-user-report-form
Why was the change made?
When investigating messaging issues reported by users, found out this oversight.
Caveats?
Related Trello issue
Link to the Trello ticket
Checklist