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 to remove all messages from current chat #2175

Merged
merged 1 commit into from Mar 14, 2023
Merged

Conversation

adbenitez
Copy link
Member

to decide: when chat has no messages, what to do? hide the menu item? show an error toast on menu item selected? show a dialog?

currently the same dialog is show for all cases so when there is no messages the "delete 0 messages?" dialog is shown and does nothing

@adbenitez
Copy link
Member Author

adbenitez commented Dec 17, 2021

this does what is described in deltachat/deltachat-core-rust#1299 but in the Android side, could be tweaked when such core api is added

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item android:title="@string/menu_delete_messages"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reused this string but maybe a "clear chat"/"clear history" string could be added

@github-actions
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@Simon-Laux
Copy link
Member

is there a core function for it or is this using ui code to delete each message?

@r10s
Copy link
Member

r10s commented Nov 28, 2022

ftr, desktop does a similar thing since deltachat/deltachat-desktop#2909 - if there are no issues with that, we can maybe revive this pr.

@adbenitez
Copy link
Member Author

ftr, desktop does a similar thing since deltachat/deltachat-desktop#2909 - if there are no issues with that, we can maybe revive this pr.

@r10s so desktop already have this and some users already have complained in community channels about this issue that they can do it in desktop but can't in Android, is something blocking from merging this PR?
cc @Hocuri

@adbenitez
Copy link
Member Author

@r10s
Copy link
Member

r10s commented Mar 13, 2023

yip, i think, we can get that in, at some point a core-function would be nice and more performant, but it seems good enough already this way.

to the wording:

whatsapp (ios/android) is using the term "Clear Chat" as well
telegram (ios) uses "Clear Messages", telegram (macos) uses "Clear Chat History" (not really consistent)
signal does not have this function, but woth "Clear message history" you can clear all chats

so, i'd say "Clear Chat", as already introduced on desktop seems okay, esp. as in the following confirmation we ask explicitly to confirm deletion of "N messages".

so, what's missing is only the string "Clear Chat" :)

@adbenitez
Copy link
Member Author

so, what's missing is only the string "Clear Chat" :)

ok, changed to use "Clear Chat" string

@github-actions
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

Copy link
Member

@r10s r10s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, i think, this can go to 1.36 :)

@adbenitez adbenitez merged commit 920889c into master Mar 14, 2023
2 checks passed
@adbenitez adbenitez deleted the adb-clear-chat branch March 14, 2023 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants