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" in account menu unconditionally and move it down, right over settings menu item #4234

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- replace BlueprintJS Button, Icon, Radio, RadioGroup, Collapse, Dialog with our implementation #4006, #4226
- Update `@deltachat/stdio-rpc-server` and `deltachat/jsonrpc-client` to `1.147.1`
- Update proxy configuration - a full url can be entered now
- show "Mark All As Read" in account menu unconditionally #4234

### Fixed
- fix that you can not click header button in dialog when they are on top of the navbar #4093
Expand Down Expand Up @@ -57,6 +58,7 @@
- some reactions dialog items not being clickable on secondary accounts (profiles) #4228
- target-electron: make sure log of stdio server is also logged to file
- improve accessibility a little #4133
- fix "Mark All As Read" in account menu mark also archived chats as read
- use authname instead of displayname for vcard filename #4233


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Icon from '../Icon'

import styles from './styles.module.scss'

import type { T } from '@deltachat/jsonrpc-client'
import { C, type T } from '@deltachat/jsonrpc-client'
import { openMapWebxdc } from '../../system-integration/webxdc'

type Props = {
Expand Down Expand Up @@ -73,13 +73,6 @@ export default function AccountItem({
const bgSyncDisabled = syncAllAccounts === false && !isSelected

const { onContextMenu, isContextMenuActive } = useContextMenuWithActiveState([
!bgSyncDisabled &&
unreadCount > 0 && {
label: tx('mark_all_as_read'),
action: () => {
markAccountAsRead(account.id)
},
},
muted
? {
label: tx('menu_unmute'),
Expand Down Expand Up @@ -113,6 +106,12 @@ export default function AccountItem({
openMapWebxdc(account.id)
},
},
{
label: tx('mark_all_as_read'),
action: () => {
markAccountAsRead(account.id)
},
},
{
label: tx('menu_settings'),
action: async () => {
Expand Down Expand Up @@ -251,6 +250,8 @@ async function markAccountAsRead(accountId: number) {
}
}
}
// Add archived chats to also mark them as read
uniqueChatIds.add(C.DC_CHAT_ID_ARCHIVED_LINK)

for (const chatId of uniqueChatIds) {
await EffectfulBackendActions.marknoticedChat(accountId, chatId)
Expand Down
Loading