From faf24e95149c352476a074728f711eeca20c86dc Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Tue, 5 Sep 2023 16:24:27 +1000 Subject: [PATCH] minor refactor --- Session/Media Viewing & Editing/MessageInfoView.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Session/Media Viewing & Editing/MessageInfoView.swift b/Session/Media Viewing & Editing/MessageInfoView.swift index 63fbc612a..4a23292ca 100644 --- a/Session/Media Viewing & Editing/MessageInfoView.swift +++ b/Session/Media Viewing & Editing/MessageInfoView.swift @@ -12,6 +12,8 @@ struct MessageInfoView: View { @State var index = 1 @State var showingAttachmentFullScreen = false + static private let cornerRadius: CGFloat = 18 + var actions: [ContextMenuVC.Action] var messageViewModel: MessageViewModel var isMessageFailed: Bool { @@ -44,7 +46,7 @@ struct MessageInfoView: View { (.messageBubble_outgoingBackground, .messageBubble_outgoingText) ZStack { - RoundedRectangle(cornerRadius: 18) + RoundedRectangle(cornerRadius: Self.cornerRadius) .fill(themeColor: bubbleBackgroundColor) Text(body) @@ -148,7 +150,7 @@ struct MessageInfoView: View { // Attachment Info ZStack { - RoundedRectangle(cornerRadius: 17) + RoundedRectangle(cornerRadius: Self.cornerRadius) .fill(themeColor: .backgroundSecondary) VStack( @@ -223,7 +225,7 @@ struct MessageInfoView: View { // Message Info ZStack { - RoundedRectangle(cornerRadius: 17) + RoundedRectangle(cornerRadius: Self.cornerRadius) .fill(themeColor: .backgroundSecondary) VStack( @@ -311,7 +313,7 @@ struct MessageInfoView: View { // Actions if !actions.isEmpty { ZStack { - RoundedRectangle(cornerRadius: 17) + RoundedRectangle(cornerRadius: Self.cornerRadius) .fill(themeColor: .backgroundSecondary) VStack(