mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fixes for the sync state UI when errors occur
If syncing fails, the item is still saved so we don't change the title. When syncing fails make sure the red error cloud is shown.
This commit is contained in:
parent
975411d429
commit
f54968d5d1
2 changed files with 4 additions and 4 deletions
|
|
@ -166,12 +166,12 @@ class ExtensionSaveService {
|
|||
}
|
||||
|
||||
} catch {
|
||||
print("ERROR SYNCING", error)
|
||||
updateStatus(newStatus: .syncFailed(error: SaveArticleError.unknown(description: "Unknown Error")))
|
||||
return
|
||||
}
|
||||
|
||||
state = .finished
|
||||
updateStatus(newStatus: .synced)
|
||||
state = .finished
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,11 +156,11 @@ public struct ShareExtensionChildView: View {
|
|||
|
||||
private var titleText: String {
|
||||
switch viewModel.status {
|
||||
case .saved, .synced:
|
||||
case .saved, .synced, .syncFailed(error: _):
|
||||
return "Saved to Omnivore"
|
||||
case .processing:
|
||||
return "Saving to Omnivore"
|
||||
default:
|
||||
case .failed(error: _):
|
||||
return "Error saving to Omnivore"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue