@@ -300,6 +300,7 @@ class ContactDetailViewController: UITableViewController {
headerCell.setMuted(isMuted: viewModel.chatIsMuted)
headerCell.showMuteButton(show: true)
}
+ headerCell.showSearchButton(show: viewModel.chatCanSend)
private func updateCellValues() {
@@ -336,6 +336,7 @@ class GroupChatDetailViewController: UIViewController {
groupHeader.setVerified(isVerified: chat.isProtected)
groupHeader.setMuted(isMuted: chat.isMuted)
+ groupHeader.showSearchButton(show: chat.canSend)
private func updateEphemeralTimerCellValue() {
@@ -109,6 +109,10 @@ class ContactDetailViewModel {
return chatId != 0 && context.getChat(chatId: chatId).isArchived
+ var chatCanSend: Bool {
+ return chatId != 0 && context.getChat(chatId: chatId).canSend
+ }
+
var chatIsMuted: Bool {
return chatId != 0 && context.getChat(chatId: chatId).isMuted