-
-
Notifications
You must be signed in to change notification settings - Fork 52
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 saved messages #2527
base: main
Are you sure you want to change the base?
improve saved messages #2527
Conversation
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.
Looks nice! What happens when you delete a saved message? (More Options > Delete) Both in the chat and in saved messages?
the message in "Saved Messages" is deleted, the original stays as is. same the other way round: if you delete the original, the copy at "Saved Messages" stays as is, so this does not conflict with ephemeral modes, and you can save eg a way description that otherwise disappears within minutes |
e4cccad
to
ea722fc
Compare
> _took quite some time until i found the time to finish this PR and to find a time window that does not disturb other developments too much, but here we are:_ this PR enables UI to improve "Saved messages" hugely, bringing it on WhatsApp's "Starred Messages" or Telegram's "Saved Messages" level. with this PR, UIs can add the following functionality with few effort ([~100 loc on iOS](deltachat/deltachat-ios#2527)): - add a "Save" button in the messages context menu, allowing to save a message - show directly in the chat if a message was saved, eg. by a little star ★ - in "Saved Messages", show the message in its context - so with author, avatar, date and keep incoming/outgoing state - in "Saved Messages", a button to go to the original message can be added - if the original message was deleted, one can still go to the original chat these features were often requested, in the forum, but also in many one-to-one discussions, recently at the global gathering. moreover, in contrast to the old method with "forward to saved", no traffic is wasted - the messages are saved locally, and only a small sync messages is sent around this is how it looks out on iOS: <img width="260" alt="Screenshot 2025-01-17 at 00 02 51" src="https://github.com/user-attachments/assets/902741b6-167f-4af1-9f9a-bd0439dd20d0" /> <img width="353" alt="Screenshot 2025-01-17 at 00 05 33" src="https://github.com/user-attachments/assets/97eceb79-6e43-4a89-9792-2e077e7141cd" /> technically, still a copy is done from the original message (with already now deduplicated blobs), so that things work nicely with deletion modes; eg. you can save an important message and preserve it from deletion that way. jsonrpc can be done in a subsequent PR, i was implementing the UI on iOS where that was not needed (and most API were part of message object that is not in use in jsonrpc atm) @hpk42 the forward issue we discussed earller that day is already solved (first implementation did not had an explict save_msgs() but was using forward_msgs(SELF) as saving - with the disadvantage that forwarding to SELF is not working, eg. if one wants the old behaviour) acutally, that made the PR a lot nicer, as now very few existing code is changed <details> <summary>previous considerations and abandoned things</summary> while working on this PR, there was also the idea to just set a flag “starred” in the message table and not copy anything. however, while tempting, that would result in more complexity, questions and drawbacks in UI: - delete-message, delete-chat, auto-deletion, clear-chat would raise questions - what do do with the “Starred”? having a copy in “Saved Messages” does not raise this question - newly saved messages appear naturally as “new” in “Saved Messages”, simply setting a flag would show them somewhere in between - unless we do additional effort - “Saved Messages” already has its place in the UI - and allows to _directly_ save things there as well - not easily doable with “starring” - one would need to re-do many things that already exist in “Saved Messages”, at least in core - one idea to solve some of the issues could be to have “Starred” as well as “Saved Messages” - however, that would irritate user, one would remember exactly what was done with a message, and understand the fine differences whatsapp does this “starred”, btw, so when original is deleted, starred is deleted as well. Telegram does things similar to us, Signal does nothing. Whatsapp has a per-chat view for starred messages - if needed, we could do sth. like that as well, however, let’s first see how far the “all view” goes (in contrast to whatsapp, we have profiles for separation as well) for the wording: “saving” is what we’re doing here, this is much more on point as “starring” - which is more the idea of a “bookmark”, and i think, whatsapp uses this wording to not raise false expectations (still, i know of ppl that were quite upset that a “starred” message was deleted when eg. the chat was cleared to save some memory) wrt webxdc app updates: options that come into mind were: _empty_ (as now), _snapshot_ (copy all updates) or _shortcut_ (always open original). i am not sure what the best solution is, the easiest was _empty_, so i went for that, as it is (a) obvious, and what is already done with forwarding and (b) the original is easy to open now (in contrast to forwarding). so, might totally be that we need or want to tweak things here, but i would leave that outside the first iteration, things are not worsened in that area wrt reactions: as things are detached, similar to webxdc updates, we do not not to show the original reactions - that way, one can use reactions for private markers (telegram is selling that feature :) to the icon: a disk or a bookmark might be other options, but the star is nicer and also know from other apps - and anyways a but vague UX wise. so i think, it is fine finally, known issue is that if a message was saved that does not exist on another device, it does not get there. i think, that issue is a weak one, and can be ignored mostly, most times, user will save messages soon after receiving, and if on some devices auto-deletion is done, it is maybe not even expected to have suddenly another copy there </details> EDIT: once this is merged, detailed issues about what to do should be filed for android/desktop (however, they do not have urgency to adapt, things will continue working as is) --------- Co-authored-by: Hocuri <[email protected]>
737b06b
to
f78c8b5
Compare
Co-authored-by: Casper Zandbergen <[email protected]>
Co-authored-by: Casper Zandbergen <[email protected]>
f78c8b5
to
4a10b9a
Compare
this is how it looks like: