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,14 +143,16 @@ struct ReportView: View {
.appGroupedListRowBackground() .appGroupedListRowBackground()
Button(action: self.sendReport) { Button(action: self.sendReport) {
if isReporting { let label = Text(isReporting ? "Sending Report" : "Send Report")
Text("Sending Report") HStack {
label
Spacer() Spacer()
ProgressView() if isReporting {
.progressViewStyle(.circular) ProgressView()
} else { .progressViewStyle(.circular)
Text("Send Report") }
} }
.accessibilityLabel(label)
} }
.disabled(isReporting) .disabled(isReporting)
.appGroupedListRowBackground() .appGroupedListRowBackground()