Fix spinner on Send Report button being misplaced

Closes #377
This commit is contained in:
Shadowfacts 2023-05-04 10:16:15 -04:00
parent 098c4254d4
commit 7b218bfd75
1 changed files with 8 additions and 6 deletions

View File

@ -143,15 +143,17 @@ struct ReportView: View {
.appGroupedListRowBackground()
Button(action: self.sendReport) {
if isReporting {
Text("Sending Report")
let label = Text(isReporting ? "Sending Report" : "Send Report")
HStack {
label
Spacer()
if isReporting {
ProgressView()
.progressViewStyle(.circular)
} else {
Text("Send Report")
}
}
.accessibilityLabel(label)
}
.disabled(isReporting)
.appGroupedListRowBackground()
}