From 5a9ed86d1b69f135708fb741a54f45b198172158 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 14 Aug 2023 22:55:18 +0100 Subject: [PATCH] ios: send button color for incognito conversations (#2918) --- apps/ios/Shared/Views/Chat/ComposeMessage/ComposeView.swift | 6 +++++- .../Shared/Views/Chat/ComposeMessage/SendMessageView.swift | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeView.swift b/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeView.swift index cfa4a6317..e2a6cd1d2 100644 --- a/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeView.swift +++ b/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeView.swift @@ -240,6 +240,7 @@ struct ComposeView: View { @State var pendingLinkUrl: URL? = nil @State var cancelledLinks: Set = [] + @Environment(\.colorScheme) private var colorScheme @State private var showChooseSource = false @State private var showMediaPicker = false @State private var showTakePhoto = false @@ -308,7 +309,10 @@ struct ComposeView: View { allowVoiceMessagesToContact: allowVoiceMessagesToContact, timedMessageAllowed: chat.chatInfo.featureEnabled(.timedMessages), onMediaAdded: { media in if !media.isEmpty { chosenMedia = media }}, - keyboardVisible: $keyboardVisible + keyboardVisible: $keyboardVisible, + sendButtonColor: chat.chatInfo.incognito + ? .indigo.opacity(colorScheme == .dark ? 1 : 0.7) + : .accentColor ) .padding(.trailing, 12) .background(.background) diff --git a/apps/ios/Shared/Views/Chat/ComposeMessage/SendMessageView.swift b/apps/ios/Shared/Views/Chat/ComposeMessage/SendMessageView.swift index 5da8a99f7..73c728692 100644 --- a/apps/ios/Shared/Views/Chat/ComposeMessage/SendMessageView.swift +++ b/apps/ios/Shared/Views/Chat/ComposeMessage/SendMessageView.swift @@ -28,6 +28,7 @@ struct SendMessageView: View { @State private var holdingVMR = false @Namespace var namespace @Binding var keyboardVisible: Bool + var sendButtonColor = Color.accentColor @State private var teHeight: CGFloat = 42 @State private var teFont: Font = .body @State private var teUiFont: UIFont = UIFont.preferredFont(forTextStyle: .body) @@ -169,7 +170,7 @@ struct SendMessageView: View { ? "checkmark.circle.fill" : "arrow.up.circle.fill") .resizable() - .foregroundColor(.accentColor) + .foregroundColor(sendButtonColor) .frame(width: sendButtonSize, height: sendButtonSize) .opacity(sendButtonOpacity) }