Skip to content

Commit

Permalink
Synchronize defaults when a feed check is complete to prevent data loss.
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgio Calderolla committed Oct 22, 2021
1 parent 209e6ba commit 23ed6a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Catch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 786;
CURRENT_PROJECT_VERSION = 791;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -788,7 +788,7 @@
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 786;
CURRENT_PROJECT_VERSION = 791;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down
3 changes: 3 additions & 0 deletions Sources/App/FeedChecker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ final class FeedChecker {
os_log("Feed Helper error (checking feed): %{public}@", log: .main, type: .error, error.localizedDescription)
self?.lastCheckStatus = .failed(Date(), error)
}

// Synchronize defaults here. If the app dies uncleanly, no data loss.
Defaults.shared.save()
}
)
}
Expand Down

0 comments on commit 23ed6a4

Please sign in to comment.