Skip to content

Commit

Permalink
also in archive, allow to select which chats to mark as read; still d…
Browse files Browse the repository at this point in the history
…efaults to 'mark all archive read'
  • Loading branch information
r10s committed Jul 2, 2024
1 parent 4daec1c commit cc30a1f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions deltachat-ios/Controller/ChatListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,11 @@ class ChatListViewController: UITableViewController {
}

@objc func markReadPressed() {
if isArchive {
dcContext.marknoticedChat(chatId: Int(DC_CHAT_ID_ARCHIVED_LINK))
} else if isEditing {
if isEditing {
viewModel?.markUnreadSelectedChats(in: tableView.indexPathsForSelectedRows)
setLongTapEditing(false)
} else if isArchive {
dcContext.marknoticedChat(chatId: Int(DC_CHAT_ID_ARCHIVED_LINK))
}
}

Expand Down Expand Up @@ -716,10 +716,10 @@ class ChatListViewController: UITableViewController {
}

func updateMarkReadButton() {
if isArchive {
self.markReadButton.isEnabled = dcContext.getUnreadMessages(chatId: Int(DC_CHAT_ID_ARCHIVED_LINK)) != 0
} else if tableView.isEditing {
if tableView.isEditing {
self.markReadButton.isEnabled = viewModel?.hasAnyUnreadChatSelected(in: tableView.indexPathsForSelectedRows) ?? false
} else if isArchive {
self.markReadButton.isEnabled = dcContext.getUnreadMessages(chatId: Int(DC_CHAT_ID_ARCHIVED_LINK)) != 0
}
}

Expand Down

0 comments on commit cc30a1f

Please sign in to comment.