make all sheets on the main body

fix crash when backgrounding the app
This commit is contained in:
Trey t
2022-03-17 14:57:32 -05:00
parent 0113e2304a
commit f87d216e65
6 changed files with 46 additions and 47 deletions

View File

@@ -174,16 +174,11 @@ struct AllMoodsTotalTemplate: View, SharingTemplate {
.foregroundColor(Color.white)
.padding(.top, 20)
})
.sheet(isPresented: self.$shareImage.showFuckingSheet) {
if let uiImage = self.shareImage.fuckingWrappedShrable {
ShareSheet(photo: uiImage)
}
}
.frame(maxWidth: .infinity, alignment: .center)
.background(
Color.green
)
.padding(.trailing, -5)
.frame(maxWidth: .infinity, alignment: .center)
.background(
Color.green
)
.padding(.trailing, -5)
Button(action: {
presentationMode.wrappedValue.dismiss()
@@ -210,6 +205,11 @@ struct AllMoodsTotalTemplate: View, SharingTemplate {
.scaleEffect(2)
} else {
mainView
.sheet(isPresented: self.$shareImage.showFuckingSheet) {
if let uiImage = self.shareImage.fuckingWrappedShrable {
ShareSheet(photo: uiImage)
}
}
}
}
}