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

show "Mark All As Read" unconditionally #3979

Closed
r10s opened this issue Jun 27, 2024 · 4 comments · Fixed by #4234
Closed

show "Mark All As Read" unconditionally #3979

r10s opened this issue Jun 27, 2024 · 4 comments · Fixed by #4234
Assignees
Labels
bug Something isn't working

Comments

@r10s
Copy link
Member

r10s commented Jun 27, 2024

the sidebar introduced a new function "Mark All As Read", which, however, is unexpectedly not available when a single chat is muted - but esp. then you want this function as one cares less about a chat anyways :)

same for muted archived chats, which also should count into "All"

the reason for the issue be that jsonrpc-pendents of dc_get_fresh_msg_cnt()/dc_get_fresh_msgs() are used to show/hide the option and to mark chats as read - however, already by its name "fresh" is not "all" :)

if these information are not easily available in the UI, we should consider adding dedicated core functions as dc_has_unnoticed_chats() and dc_marknoticed_all_chats() (due to multiple meanings, we avoid the the term "read" in the api, cmp)

EDIT: idea is to just show the item unconditionally, above "Settings", see discussion below

no "Mark All As Read" here although there are unread chats

@Simon-Laux
Copy link
Member

made a core issue for that deltachat/deltachat-core-rust#5825

@r10s
Copy link
Member Author

r10s commented Oct 21, 2024

i am wondering, if we shouldn't just show the menu item unconditionally

  • on android, we also have that option unconditionally since some time, no one wonders so far

  • it is pretty hidden anyways and available in he context menu only, so nothing that would clutter primary UI

  • having that shown/hidden at the top is anyway bad, as that way, eg. "All Media" is always at a different position (surely, it can go elsewhere or being disabled, but that would be one thing less to worry about)

  • showing that unconditionally would also provide a way around marking all things as read even if there are bugs in counting or thelike

  • less API to care for

this would fix the issue at hand, and if ppl really get confused (i doubt, the wording is not even wrong), we can iterate.

for the position, i would not make that first, maybe move it above settings.

@Simon-Laux
Copy link
Member

Simon-Laux commented Oct 21, 2024

ideally I'd say always show, but as somehow disabled when you can't click it. (like mark as read button in iOS deltachat/deltachat-ios#1893)

But we can still add that later.
Also to add no new methods, we could integrate a count for all chats in getFreshMsgCnt by changing the chatId property type to Option, that you can provide None for all chats similar to other existing apis?https://js.jsonrpc.delta.chat/classes/RawClient.html#getFreshMsgCnt

@r10s
Copy link
Member Author

r10s commented Oct 21, 2024

then let's show the item unconditionally and call it a day :)

that disabling is a very minor thing in UI in this case, taking lots of effort :) sth. for when everything else is fine and stable :)

@r10s r10s changed the title "Mark All As Read" not always available show "Mark All As Read" unconditionally Oct 21, 2024
@r10s r10s removed the wait-for-core Waiting for an related core issue to be resolved label Oct 21, 2024
@Simon-Laux Simon-Laux self-assigned this Oct 21, 2024
Simon-Laux added a commit that referenced this issue Oct 21, 2024
Simon-Laux added a commit that referenced this issue Oct 21, 2024
Simon-Laux added a commit that referenced this issue Oct 22, 2024
…own, right over settings menu item (#4234)

* show "Mark All As Read" in account menu unconditionally and move it down, right over settings menu item

closes #3979

* also mark archived chats as read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants