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