From 020fa90fb7b6e0990e14f2f9eb9068ca1f607c93 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Tue, 7 May 2024 19:52:40 +0400 Subject: [PATCH] fix buttons --- apps/ios/Shared/Views/Chat/ChatInfoView.swift | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/apps/ios/Shared/Views/Chat/ChatInfoView.swift b/apps/ios/Shared/Views/Chat/ChatInfoView.swift index 8971b14b84..5567f8799f 100644 --- a/apps/ios/Shared/Views/Chat/ChatInfoView.swift +++ b/apps/ios/Shared/Views/Chat/ChatInfoView.swift @@ -196,9 +196,9 @@ struct ChatInfoView: View { connStats.ratchetSyncAllowed { synchronizeConnectionButton() } -// } else if developerTools { -// synchronizeConnectionButtonForce() -// } + // } else if developerTools { + // synchronizeConnectionButtonForce() + // } } .disabled(!contact.ready || !contact.active) @@ -402,46 +402,46 @@ struct ChatInfoView: View { } private func messageButton() -> some View { - Button { - if openedFromChatView { - dismiss() - } else { - chatModel.chatId = chat.id + actionButton("message.fill", "message") + .foregroundColor(.accentColor) + .onTapGesture { + if openedFromChatView { + dismiss() + } else { + chatModel.chatId = chat.id + } } - } label: { - actionButton("message.fill", "message") - } - .disabled(!contact.sendMsgEnabled) + .disabled(!contact.sendMsgEnabled) } private func callButton() -> some View { - Button { - if openedFromChatView { - dismiss() - makeCall = .audio - } else { - chatModel.openChatAction = .call(media: .audio) - chatModel.chatId = chat.id + actionButton("phone.fill", "call") + .foregroundColor(.accentColor) + .onTapGesture { + if openedFromChatView { + dismiss() + makeCall = .audio + } else { + chatModel.openChatAction = .call(media: .audio) + chatModel.chatId = chat.id + } } - } label: { - actionButton("phone.fill", "call") - } - .disabled(!contact.ready || !contact.active || !contact.mergedPreferences.calls.enabled.forUser || chatModel.activeCall != nil) + .disabled(!contact.ready || !contact.active || !contact.mergedPreferences.calls.enabled.forUser || chatModel.activeCall != nil) } private func videoButton() -> some View { - Button { - if openedFromChatView { - dismiss() - makeCall = .video - } else { - chatModel.openChatAction = .call(media: .video) - chatModel.chatId = chat.id + actionButton("video.fill", "video") + .foregroundColor(.accentColor) + .onTapGesture { + if openedFromChatView { + dismiss() + makeCall = .video + } else { + chatModel.openChatAction = .call(media: .video) + chatModel.chatId = chat.id + } } - } label: { - actionButton("video.fill", "video") - } - .disabled(!contact.ready || !contact.active || !contact.mergedPreferences.calls.enabled.forUser || chatModel.activeCall != nil) + .disabled(!contact.ready || !contact.active || !contact.mergedPreferences.calls.enabled.forUser || chatModel.activeCall != nil) } private func actionButton(_ image: String, _ title: LocalizedStringKey) -> some View {