-
Notifications
You must be signed in to change notification settings - Fork 987
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
🗑 Delete message UI #12390
🗑 Delete message UI #12390
Conversation
Jenkins BuildsClick to see older builds (15)
|
@shivekkhurana is it wip ?is draft |
@flexsurfer It's wip. I'm not clear if the messages will be deleted from the network, and if yes, how to handle them. Started a conversation thread on Discord here. |
18feae4
to
57c3c6a
Compare
@flexsurfer I have implemented a UI only message delete. It doesn't rebuilds the list on every delete. |
UPDATE : Resolved Known Bug: Deleted message is visible to the receiver until they go-back to the chat index and open the chat again.
{:description "",
:lastClockValue 1627977236319,
:deletedAtClockValue 0,
:joined 1627976672860,
:identicon "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAmklEQVR4nOzY0QnCQBAGYRV7sSnLsAzLsCmrSd6PHLnlODL8zPcoizAsLEcetxCG0BhCYwiNITQxIc/Rwe//tx39/nm971fMt2I2YgiNIVokZiOG0BhCM/3W6qm+qar/04rZiCE0htAMX62e0atyNl+9Zq2YjRhCYwjN9NXqmf1OVRWzEUNoDNEiMRsxhMYQGkNoDKHZAwAA//8uLB1h/9556wAAAABJRU5ErkJggg==",
:color "",
:name "0x045238",
:alias "Remarkable Uniform Nudibranch",
:lastMessage {:messageType 1,
:identicon "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAoUlEQVR4nOzYwQnCQBBGYRV7sSQbsQwbsSSrSe4hC7PZXXj8vO88Bx8Dg5vHLYQhNIbQGEJjCE1MyLM6+P3/trU/5dzn9b5X5mI2YgiNITSli3BF68pVr1CvmI0YQmMIzfAFmfUfbPSaxWzEEBpDaMovxF6tK7TqpRmzEUNoDKEZ/q7Ve51mzR/FbMQQGkO0SMxGDKExhMYQGkNo9gAAAP//YnAcZw9HxUQAAAAASUVORK5CYII=",
:replace "",
:chatId "0x0452380654d8e40fcd056db49b1c71c99358d5bc320b1ed0b862c400cbf3201ed7cfb1a480b245c69614453381e5bff2fd8ccffcafb4b9155883f58ef2511d95a9",
:lineCount 0,
:whisperTimestamp 1627977123593,
:alias "Welloff Impressive Reptile",
:seen true,
:gapParameters {},
:from "0x040f2f9a3ccba626625e4479fe61a806dca36fcb453050c21adc36f6d8f024611869326464d6143e2339a9ba7f3f477abe6a9e56fb94cd46b5df14378f50e43d43",
:id "0x6214e4b09359d6fa73f0fcc302b1089be603676a1fd1a5a147f8d885e42ab0f6",
:parsedText [{:type "paragraph",
:children [{:literal "2"}]}],
:contentType 1,
:clock 1627977123593,
:localChatId "0x0452380654d8e40fcd056db49b1c71c99358d5bc320b1ed0b862c400cbf3201ed7cfb1a480b245c69614453381e5bff2fd8ccffcafb4b9155883f58ef2511d95a9",
:outgoingStatus "delivered",
:timestamp 1627977123593,
:ensName "",
:quotedMessage nil,
:rtl false,
:responseTo "",
:text "2"},
:active true,
:id "0x0452380654d8e40fcd056db49b1c71c99358d5bc320b1ed0b862c400cbf3201ed7cfb1a480b245c69614453381e5bff2fd8ccffcafb4b9155883f58ef2511d95a9",
:unviewedMentionsCount 0,
:unviewedMessagesCount 0,
:membershipUpdateEvents nil,
:chatType 1,
:members nil,
:timestamp 1627977237846}
|
@shivekkhurana |
@churik This is ready to test |
(defn flip-args [f] | ||
(fn [x y] (f y x))) | ||
|
||
(defn message-ids->message-id-chat-id-map |
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.
mhm , why is it so complex ? isn't it possible to have this in the format we want from status-go ?
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.
Currently, the backend only returns the message-id
of the deleted messages. But messages are indexed by chat-id
in the frontend model. Its not ideal. I'll check if I can re-write the backend. There is one more issue that needs to be solved.
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 mean its not urgent, i think thats fine
96% of end-end tests have passed
Failed tests (3)Click to expand
Passed tests (68)Click to expand |
96% of end-end tests have passed
Failed tests (3)Click to expand
Passed tests (68)Click to expand |
ISSUE 1: Recipient sees the deleted message if it was received while Recipient was offline/logged out.Reproduction:
Expected behaviour: no message in chat history ISSUE 2: Unread indicator/counter is shown for deleted messageReproduction:
Expected behaviour: unread indicator disappears after deleting a message IMG_0833.mp4ISSUE 3: Deleted message is visible in Activity centerIf D1 sends a message (in 1-1 or mention/reply in group/community) and deletes it, preview with deleted message will be displayed in Activity center. ISSUE 4: Deleted message is visible in push notificationsIf you think it's better to fix it in a separate PR, ping me pls and I'll log it. ISSUE 5: Redundant
|
ISSUE 1 is a bug in Status-go |
4c082ab
to
c3f5130
Compare
@qoqobolo issue 1 should be fixed in the next build, do you think is good enough to merge or there's some other issue that's blocking you think? Thanks! |
@cammellos confirm that Issue 1 is fixed, that's great, thanks! However, it would be nice to have fixed issues 3, 4, 5, and 6 in the PR if possible as well, since there are quite a few places left where the deleted messages remain visible for users. But if you think it would be more convenient to fix it later, let me know, I'll log them separately and include them to 1.16. |
@qoqobolo if you could log them separately, it would be better, if that's ok, if we could merge, so we don't have to rebase, and I can take a look at the remaining issues. |
@cammellos sure, np! |
c3f5130
to
8ec46a0
Compare
fixes #12286
Summary
Add the option to delete chat message. Also introduce a new UI for message actions.
View screenshot 📸
Review notes
Messages are critical in terms of perf. Verify that this PR doesn't introduces unintended pitfalls.
Platforms
Areas that maybe impacted
Functional
Steps to test
status: WIP