Skip to content
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

allow editing messages #4695

Open
r10s opened this issue Feb 21, 2025 · 0 comments
Open

allow editing messages #4695

r10s opened this issue Feb 21, 2025 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@r10s
Copy link
Member

r10s commented Feb 21, 2025

after #4694 is done:

  • add jsonrpc for dc_send_edit_request()

  • add the menu entry "Edit" (string global_menu_edit_desktop) to the context menu of outgoing messages that are not info/videochat and have a text and does not have html and where the chat allows sending in general (check chat_can_send(), there were discussions about having a core-api, but were discarded for $reasons)

  • when "Edit" is tapped:

    • create a draft with title set to "Edit Message" (string edit_message) and subtitle the text to edit (use the same layout as for quotes)
    • right of title/subtitles, as usual, show a "X" that cancels editing and reverts to normal sending mode
    • hide "attachment" button, leave "send" button as is
    • it is okay to discard existing draft, if that is easier than keeping them
    • in case the whole text is removed, disable the "send" button as usual
  • when "Send" is tapped from "Edit":

    • call dc_send_edit_request() with the new text
    • it is fine to call the function even if the text is not changed (will do nothing then)
    • go back to normal "enter message to send" mode

this UI is known from many other messengers

refer to deltachat/deltachat-ios#2611 and deltachat/deltachat-android#3601 for example code and screenshots

@r10s r10s added the enhancement New feature or request label Feb 21, 2025
@Simon-Laux Simon-Laux added this to the New composer milestone Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants