Load incomplete content, show errors
This commit is contained in:
@ -16,9 +16,13 @@ extension Content {
|
||||
}
|
||||
|
||||
func saveIfNeeded() {
|
||||
guard saveState != .isSaved else {
|
||||
switch saveState {
|
||||
case .isSaved, .savingPausedDueToLoadErrors, .storageNotInitialized:
|
||||
return
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
if Date.now.timeIntervalSince(lastModification) < 5 {
|
||||
// Additional modification made
|
||||
// Wait for next scheduled invocation of saveIfNeeded()
|
||||
@ -43,7 +47,6 @@ extension Content {
|
||||
}
|
||||
|
||||
private func saveToDisk() -> Bool {
|
||||
guard didLoadContent else { return false }
|
||||
guard storage.contentScope != nil else {
|
||||
print("Storage not initialized, not saving content")
|
||||
return false
|
||||
|
Reference in New Issue
Block a user