add full screen button on message info screen

pull/874/head
Ryan Zhao 2 years ago
parent 8e1e74b9c0
commit 3ccf5995f2

@ -13,6 +13,7 @@ struct MessageInfoView: View {
} }
var body: some View { var body: some View {
NavigationView {
ZStack (alignment: .topLeading) { ZStack (alignment: .topLeading) {
if #available(iOS 14.0, *) { if #available(iOS 14.0, *) {
Color.black.ignoresSafeArea() Color.black.ignoresSafeArea()
@ -97,6 +98,7 @@ struct MessageInfoView: View {
} }
if let attachments = messageViewModel.attachments { if let attachments = messageViewModel.attachments {
ZStack(alignment: .bottomTrailing) {
if attachments.count > 1 { if attachments.count > 1 {
// Attachment carousel view // Attachment carousel view
SessionCarouselView_SwiftUI(index: $index, contentInfos: [.orange, .gray, .blue, .yellow]) SessionCarouselView_SwiftUI(index: $index, contentInfos: [.orange, .gray, .blue, .yellow])
@ -105,6 +107,31 @@ struct MessageInfoView: View {
maxHeight: .infinity, maxHeight: .infinity,
alignment: .topLeading alignment: .topLeading
) )
} else {
// TODO: one attachment
}
Button {
// TODO: full screen function
} label: {
ZStack {
Circle()
.foregroundColor(.init(white: 0, opacity: 0.4))
Image(systemName: "arrow.up.left.and.arrow.down.right")
.font(.system(size: 13))
.foregroundColor(.white)
}
.frame(width: 26, height: 26)
}
.padding(
EdgeInsets(
top: 0,
leading: 0,
bottom: 8,
trailing: 38
)
)
}
.padding( .padding(
EdgeInsets( EdgeInsets(
top: 4, top: 4,
@ -113,9 +140,6 @@ struct MessageInfoView: View {
trailing: 0 trailing: 0
) )
) )
} else {
// TODO: one attachment
}
// Attachment Info // Attachment Info
ZStack { ZStack {
@ -349,6 +373,11 @@ struct MessageInfoView: View {
} }
} }
} }
.navigationBarTitle(
"Message Info",
displayMode: .inline
)
}
} }
} }

@ -58,7 +58,6 @@ struct ArrowView: View {
var body: some View { var body: some View {
let imageName = self.type == .decrement ? "chevron.left" : "chevron.right" let imageName = self.type == .decrement ? "chevron.left" : "chevron.right"
Button { Button {
print("Tap")
if self.type == .decrement { if self.type == .decrement {
decrement() decrement()
} else { } else {

Loading…
Cancel
Save