Fix unclickable image dismiss button
Changelog-Fixed: Fix unclickable image dismiss button Closes: #833
This commit is contained in:
@@ -16,26 +16,6 @@ struct ImageView: View {
|
|||||||
@State private var selectedIndex = 0
|
@State private var selectedIndex = 0
|
||||||
@State var showMenu = true
|
@State var showMenu = true
|
||||||
|
|
||||||
var navBarView: some View {
|
|
||||||
VStack {
|
|
||||||
HStack {
|
|
||||||
/*
|
|
||||||
Text(urls[selectedIndex]?.lastPathComponent ?? "")
|
|
||||||
.bold()
|
|
||||||
*/
|
|
||||||
|
|
||||||
Spacer()
|
|
||||||
|
|
||||||
Button(action: {
|
|
||||||
presentationMode.wrappedValue.dismiss()
|
|
||||||
}, label: {
|
|
||||||
Image(systemName: "xmark")
|
|
||||||
})
|
|
||||||
}
|
|
||||||
.padding()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var tabViewIndicator: some View {
|
var tabViewIndicator: some View {
|
||||||
HStack(spacing: 10) {
|
HStack(spacing: 10) {
|
||||||
ForEach(urls.indices, id: \.self) { index in
|
ForEach(urls.indices, id: \.self) { index in
|
||||||
@@ -80,7 +60,7 @@ struct ImageView: View {
|
|||||||
.overlay(
|
.overlay(
|
||||||
VStack {
|
VStack {
|
||||||
if showMenu {
|
if showMenu {
|
||||||
navBarView
|
NavDismissBarView()
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
if (urls.count > 1) {
|
if (urls.count > 1) {
|
||||||
|
|||||||
@@ -39,14 +39,11 @@ struct ProfileImageContainerView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ProfilePicImageView: View {
|
struct NavDismissBarView: View {
|
||||||
|
|
||||||
let pubkey: String
|
|
||||||
let profiles: Profiles
|
|
||||||
|
|
||||||
@Environment(\.presentationMode) var presentationMode
|
@Environment(\.presentationMode) var presentationMode
|
||||||
|
|
||||||
var navBarView: some View {
|
var body: some View {
|
||||||
HStack {
|
HStack {
|
||||||
Button(action: {
|
Button(action: {
|
||||||
presentationMode.wrappedValue.dismiss()
|
presentationMode.wrappedValue.dismiss()
|
||||||
@@ -61,6 +58,14 @@ struct ProfilePicImageView: View {
|
|||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct ProfilePicImageView: View {
|
||||||
|
|
||||||
|
let pubkey: String
|
||||||
|
let profiles: Profiles
|
||||||
|
|
||||||
|
@Environment(\.presentationMode) var presentationMode
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
@@ -79,7 +84,7 @@ struct ProfilePicImageView: View {
|
|||||||
presentationMode.wrappedValue.dismiss()
|
presentationMode.wrappedValue.dismiss()
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
.overlay(navBarView, alignment: .top)
|
.overlay(NavDismissBarView(), alignment: .top)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ struct ProfileView: View {
|
|||||||
is_zoomed.toggle()
|
is_zoomed.toggle()
|
||||||
}
|
}
|
||||||
.fullScreenCover(isPresented: $is_zoomed) {
|
.fullScreenCover(isPresented: $is_zoomed) {
|
||||||
ProfileZoomView(pubkey: profile.pubkey, profiles: damus_state.profiles) }
|
ProfilePicImageView(pubkey: profile.pubkey, profiles: damus_state.profiles) }
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user