Fix crash on "Report issue"

This commit is contained in:
Davide De Rosa 2024-10-04 15:45:40 +02:00
parent 1b5e123fa6
commit eea5486563
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
2 changed files with 8 additions and 4 deletions

View File

@ -60,6 +60,8 @@ extension ReportIssueButton: View {
}
private extension ReportIssueButton {
@MainActor
func sendEmail() {
Task {
isPending = true

View File

@ -37,16 +37,18 @@ extension ReportIssueButton: View {
}
private extension ReportIssueButton {
@MainActor
func sendEmail() {
Task {
guard let service = NSSharingService(named: .composeEmail) else {
isUnableToEmail = true
return
}
isPending = true
defer {
isPending = false
}
guard let service = NSSharingService(named: .composeEmail) else {
isUnableToEmail = true
return
}
let issue = await Issue.withMetadata(.init(
configuration: .shared,
versionString: BundleConfiguration.mainVersionString,