Fix crash on "Report issue"
This commit is contained in:
parent
1b5e123fa6
commit
eea5486563
|
@ -60,6 +60,8 @@ extension ReportIssueButton: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private extension ReportIssueButton {
|
private extension ReportIssueButton {
|
||||||
|
|
||||||
|
@MainActor
|
||||||
func sendEmail() {
|
func sendEmail() {
|
||||||
Task {
|
Task {
|
||||||
isPending = true
|
isPending = true
|
||||||
|
|
|
@ -37,16 +37,18 @@ extension ReportIssueButton: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private extension ReportIssueButton {
|
private extension ReportIssueButton {
|
||||||
|
|
||||||
|
@MainActor
|
||||||
func sendEmail() {
|
func sendEmail() {
|
||||||
Task {
|
Task {
|
||||||
guard let service = NSSharingService(named: .composeEmail) else {
|
|
||||||
isUnableToEmail = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
isPending = true
|
isPending = true
|
||||||
defer {
|
defer {
|
||||||
isPending = false
|
isPending = false
|
||||||
}
|
}
|
||||||
|
guard let service = NSSharingService(named: .composeEmail) else {
|
||||||
|
isUnableToEmail = true
|
||||||
|
return
|
||||||
|
}
|
||||||
let issue = await Issue.withMetadata(.init(
|
let issue = await Issue.withMetadata(.init(
|
||||||
configuration: .shared,
|
configuration: .shared,
|
||||||
versionString: BundleConfiguration.mainVersionString,
|
versionString: BundleConfiguration.mainVersionString,
|
||||||
|
|
Loading…
Reference in New Issue