Commit f8fa21e25c
Verified · cmc
Layout: unified · split
gitbay/Admin/AdminInstance.swift +2 −1
| @@ -173,12 +173,13 @@ final class AdminInstanceViewModel { | |||
| 173 | defer { working = false } | 173 | defer { working = false } |
| 174 | do { | 174 | do { |
| 175 | try await client.run(["admin", "runners", "remove", runner.fingerprint]) | 175 | try await client.run(["admin", "runners", "remove", runner.fingerprint]) |
| 176 | await loadRunners() | ||
| 177 | } catch let error as GitbayError { | 176 | } catch let error as GitbayError { |
| 178 | actionError = error.userFacingMessage | 177 | actionError = error.userFacingMessage |
| 179 | } catch { | 178 | } catch { |
| 180 | actionError = GitbayError.transport(error).userFacingMessage | 179 | actionError = GitbayError.transport(error).userFacingMessage |
| 181 | } | 180 | } |
| 181 | // Either way: a refusal may mean the row went already. | ||
| 182 | await loadRunners() | ||
| 182 | } | 183 | } |
| 183 | 184 | ||
| 184 | func checkInbound() async { | 185 | func checkInbound() async { |
gitbay/Views/Admin/AdminInstanceViews.swift +12 −1
| @@ -214,7 +214,18 @@ struct AdminInboundView: View { | |||
| 214 | .font(.gbSans(.subheadline)) | 214 | .font(.gbSans(.subheadline)) |
| 215 | } | 215 | } |
| 216 | } | 216 | } |
| 217 | .overlay { LoadStateOverlay(state: model.inbound) } | 217 | .overlay { |
| 218 | if case .loading = model.inbound { | ||
| 219 | // A live connection to the mailbox; one that does not answer | ||
| 220 | // takes its timeout, twice with the retry. | ||
| 221 | ProgressView("Connecting to the mailbox. This can take a minute when it does not answer.") | ||
| 222 | .font(.gbSans(.subheadline)) | ||
| 223 | .multilineTextAlignment(.center) | ||
| 224 | .padding() | ||
| 225 | } else { | ||
| 226 | LoadStateOverlay(state: model.inbound) | ||
| 227 | } | ||
| 228 | } | ||
| 218 | .navigationTitle("Inbound Mail") | 229 | .navigationTitle("Inbound Mail") |
| 219 | .navigationBarTitleDisplayMode(.inline) | 230 | .navigationBarTitleDisplayMode(.inline) |
| 220 | .task { await model.checkInbound() } | 231 | .task { await model.checkInbound() } |