Fix share extension sheets on iPad so they dont show in splits, add dismiss button
This commit is contained in:
@ -53,6 +53,6 @@ public struct AddNoteSheet: View {
|
||||
}, label: {
|
||||
Text("Save").bold()
|
||||
}))
|
||||
}
|
||||
}.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,6 +117,7 @@ public struct EditLabelsSheet: View {
|
||||
Text("Done").bold()
|
||||
}))
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.environmentObject(viewModel.services.dataService)
|
||||
.task {
|
||||
await labelsViewModel.loadLabelsFromStore(dataService: viewModel.services.dataService)
|
||||
|
||||
@ -255,6 +255,19 @@ public struct ShareExtensionView: View {
|
||||
|
||||
HStack {
|
||||
Spacer()
|
||||
if UIDevice.isIPad {
|
||||
Button(action: {
|
||||
extensionContext?.completeRequest(returningItems: [], completionHandler: nil)
|
||||
}, label: {
|
||||
Text("Dismiss")
|
||||
.font(Font.system(size: 17, weight: .semibold))
|
||||
.tint(Color.appGrayText)
|
||||
.padding(20)
|
||||
})
|
||||
.frame(height: 50)
|
||||
.cornerRadius(24)
|
||||
.padding(.bottom, 15)
|
||||
}
|
||||
Button(action: {
|
||||
viewModel.handleReadNowAction(extensionContext: extensionContext)
|
||||
}, label: {
|
||||
|
||||
@ -117,7 +117,7 @@ struct LinkedItemMetadataEditView: View {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
#else
|
||||
var macOSBody: some View {
|
||||
|
||||
Reference in New Issue
Block a user