-
Notifications
You must be signed in to change notification settings - Fork 984
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 deleted message remains in preview at Jump to section #16374 #16385
Conversation
Jenkins BuildsClick to see older builds (12)
|
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.
Non blocking comments
src/status_im2/subs/shell.cljs
Outdated
(let [community (get communities (:community-id last-message))] | ||
{:content-type constants/content-type-community | ||
:data {:avatar (community-avatar community) | ||
:community-name (:name community)}}) | ||
|
||
nil)) | ||
:else nil)) |
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.
We don't need a default/fallback card?
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.
subscription only returns content for the card, and default case nil was just added for the case because it would have thrown an error if a message with an unimplemented content type was received. It's not a problem with cond, removed it.
(re-frame/subscribe [:multiaccount])]) | ||
(fn [[chat communities contacts current-multiaccount] [_ id]] | ||
(let [from (get-in chat [:last-message :from]) | ||
contact (when from (multiaccounts/contact-by-identity contacts from)) |
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.
Why do we need if from exists?
Is it possible to have a message without a sender, Is that a case for system messages maybe?
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.
Not sure, just a precaution
85% of end-end tests have passed
Failed tests (5)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMerged:
Passed tests (28)Click to expandClass TestCommunityOneDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
|
6114c42
to
1ca949b
Compare
{:content-type constants/content-type-text | ||
:data (get last-message :content)} | ||
:data {:text | ||
(if (or deleted-for-me? outgoing) |
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'm curious of why do we have to include this logic here? is it not stored in the db or elsewhere that the message was deleted? 🤔
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.
please can you elaborate, what you mean?
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 would have expected this to be handled by the chat subscription instead, it seems like the preview message of a card should just pull in data and render it and not have any logic of what to render. Perhaps it is okay as is though.
@Parveshdhull thanx for the fix. Rested and ready for merge. |
1ca949b
to
303483a
Compare
fixes #16374
status: ready