minor refactor

pull/874/head
Ryan ZHAO 2 years ago
parent 3c5c68f10d
commit 2b42ffd6d4

@ -71,8 +71,7 @@ struct DocumentView_SwiftUI: View {
} }
} }
struct DocumentView_SwiftUI_Previews: PreviewProvider { #Preview {
static var previews: some View {
VStack { VStack {
DocumentView_SwiftUI( DocumentView_SwiftUI(
attachment: Attachment( attachment: Attachment(
@ -100,5 +99,4 @@ struct DocumentView_SwiftUI_Previews: PreviewProvider {
height: 58 height: 58
) )
} }
}
} }

@ -134,8 +134,7 @@ public struct LinkPreviewView_SwiftUI: View {
} }
} }
struct LinkPreviewView_SwiftUI_Previews: PreviewProvider { #Preview {
static var previews: some View {
VStack { VStack {
LinkPreviewView_SwiftUI( LinkPreviewView_SwiftUI(
state: LinkPreview.DraftState( state: LinkPreview.DraftState(
@ -159,5 +158,4 @@ struct LinkPreviewView_SwiftUI_Previews: PreviewProvider {
) )
.padding(.horizontal, Values.mediumSpacing) .padding(.horizontal, Values.mediumSpacing)
} }
}
} }

@ -83,13 +83,11 @@ struct OpenGroupInvitationView_SwiftUI: View {
} }
} }
struct OpenGroupInvitationView_SwiftUI_Previews: PreviewProvider { #Preview {
static var previews: some View {
OpenGroupInvitationView_SwiftUI( OpenGroupInvitationView_SwiftUI(
name: "Session", name: "Session",
url: "http://open.getsession.org/session?public_key=a03c383cf63c3c4efe67acc52112a6dd734b3a946b9545f488aaa93da7991238", url: "http://open.getsession.org/session?public_key=a03c383cf63c3c4efe67acc52112a6dd734b3a946b9545f488aaa93da7991238",
textColor: .messageBubble_outgoingText, textColor: .messageBubble_outgoingText,
isOutgoing: true isOutgoing: true
) )
}
} }

@ -79,9 +79,13 @@ struct VoiceMessageView_SwiftUI: View {
} }
} }
struct VoiceMessageView_SwiftUI_Previews: PreviewProvider { #Preview {
static var previews: some View { VoiceMessageView_SwiftUI(
VoiceMessageView_SwiftUI(attachment: Attachment(variant: .voiceMessage, contentType: "mp4", byteCount: 100)) attachment: Attachment(
variant: .voiceMessage,
contentType: "mp4",
byteCount: 100
)
)
.frame(height: 58) .frame(height: 58)
}
} }

@ -72,14 +72,12 @@ public struct ActivityIndicator: View {
} }
} }
struct ActivityIndicator_Previews: PreviewProvider { #Preview {
static var previews: some View {
ActivityIndicator(themeColor: .textPrimary, width: 2) ActivityIndicator(themeColor: .textPrimary, width: 2)
.frame( .frame(
width: 40, width: 40,
height: 40 height: 40
) )
}
} }

@ -207,7 +207,22 @@ struct SessionCarouselView_SwiftUI_Previews: PreviewProvider {
Color.black Color.black
} }
SessionCarouselView_SwiftUI(index: $index, isOutgoing: true, contentInfos: []) SessionCarouselView_SwiftUI(
index: $index,
isOutgoing: true,
contentInfos: [
Attachment(
variant: .standard,
contentType: "jpeg",
byteCount: 100
),
Attachment(
variant: .standard,
contentType: "jpeg",
byteCount: 100
)
]
)
} }
} }
} }

Loading…
Cancel
Save