Commit Graph
416 Commits
Author SHA1 Message Date
Brent Simmons bb790f2a60 Add a delay between retries that gets longer each time Add logging. 2026-03-11 15:13:08 -07:00
Brent Simmons 3702421637 Provide an error description for CredentialsError which includes human-readable details plus the system error code (when there is one). 2026-03-11 14:55:46 -07:00
Brent Simmons 70e2bffdfa Expand CredentialsError to cover the different keychain operations. 2026-03-10 22:06:33 -07:00
Brent Simmons 1ed84ac4e6 Add and use new CredentialsError cases. 2026-03-10 20:11:31 -07:00
Brent Simmons d0020b88c2 Make accountSettings not weak. No need for it to be weak. Not a retain loop. 2026-03-10 19:58:36 -07:00
Brent Simmons c452b7b099 Create credentials dictionary only when at least one component is non-nil. 2026-03-10 16:35:43 -07:00
Brent Simmons 8556cb991f Add fetchFromSettingsFileIfNeeded for use when piece of data is unexpectedly nil. Also: set username from legacy storage only when not nil. 2026-03-10 16:35:24 -07:00
Brent Simmons 58a5ad90fe Make AccountSettings UserDefaults-backed instead of a small SQLite database. 2026-03-10 15:52:54 -07:00
Brent Simmons dc7a116d4c Update packages. 2026-03-08 20:42:02 -07:00
Brent Simmons 0591b5eed4 Skip vacuuming if running unit tests. Prevents a zillion little prefs being set in user defaults. 2026-03-08 20:40:22 -07:00
Brent Simmons 2e92347559 Add tests for account settings and feed settings importers. 2026-03-08 19:43:25 -07:00
Brent Simmons bdd1cfd9e1 Retrieve credentials if needed before adding a feed. Fixes #4234. 2026-03-08 14:48:52 -07:00
Brent Simmons 79154c555a Switch from swift-markdown to Tidemark. 2026-03-07 21:39:13 -08:00
Brent Simmons 4b00d41923 Retry calls to SecItemCopyMatching after a short delay to handle transient Keychain errors. 2026-03-07 21:03:05 -08:00
Brent Simmons e9a4076bea Fix static analysis warning — check for nil query. 2026-03-07 21:02:40 -08:00
Brent Simmons 687dc93cb7 Retrieve credentials if needed on resume and as step one of refreshing. This way we get another try at it in case there was a transient Keychain error earlier. 2026-03-07 20:44:01 -08:00
Brent Simmons 66e99faafe Throw the error for the attempt just made not the earlier one. 2026-03-07 20:42:58 -08:00
Brent Simmons a4874fdf32 Add logging when retrieving credentials. Call delegate.resume with account parameter. 2026-03-07 20:37:20 -08:00
Brent Simmons 9b8c2d1997 Send account parameter with resume function. 2026-03-07 20:36:41 -08:00
Brent Simmons e2a7fd0051 Handle low memory notification. 2026-03-07 17:08:46 -08:00
Brent Simmons dc27e85ed8 Add removeAll method. 2026-03-07 17:08:12 -08:00
Brent Simmons d2d85a83e5 Handle low memory notification. 2026-03-07 17:07:52 -08:00
Brent Simmons 2d5829f934 Remove unneeded urlCache. 2026-03-07 17:07:03 -08:00
Brent Simmons dc40b3162a Handle low memory in DownloadCache. 2026-03-07 16:54:34 -08:00
Brent Simmons 9143eee0c7 Add method to post a low memory notification. 2026-03-07 16:54:15 -08:00
Brent Simmons c91fd29e44 Add Mac MemoryPressureMonitor. 2026-03-07 16:53:59 -08:00
Brent Simmons d0bf68d0e3 Add removeAll method. 2026-03-07 16:35:31 -08:00
Brent Simmons 84c042b005 Add .lowMemory notification. 2026-03-07 16:27:23 -08:00
Brent Simmons 9f59e87dbc Edit header. 2026-03-07 15:38:19 -08:00
Brent Simmons 2fd9d6d3a9 Make feedID let. 2026-03-07 15:35:23 -08:00
Brent Simmons 5e29ecb91c Rename lastArticleFetchEndTime to lastRefreshCompletedDate. 2026-03-07 15:20:50 -08:00
Brent Simmons e275e56f25 Remove extraneous @MainActor annotations. 2026-03-07 15:00:45 -08:00
Brent Simmons 3f841c7954 Use FeedSettings instead of FeedMetadata. 2026-03-07 14:51:49 -08:00
Brent Simmons ea9bb2ae1e Reference account instead of account.settings. 2026-03-07 14:47:00 -08:00
Brent Simmons a690bb8de8 Use FeedSettings instead of FeedMetadata. 2026-03-07 14:35:01 -08:00
Brent Simmons caa8f5b36c Make Feed.SettingKey an enum. 2026-03-07 14:32:49 -08:00
Brent Simmons 4acb8adf5a Make Row use let properties. 2026-03-07 14:11:12 -08:00
Brent Simmons f712ec440a Always save cache-control info for feeds. 2026-03-07 14:01:59 -08:00
Brent Simmons 2a10090618 Remove calls to clearFeedMetadata, which has been removed. 2026-03-07 14:01:41 -08:00
Brent Simmons 3e17068ffa Make public CacheControlInfo properties. 2026-03-07 12:04:34 -08:00
Brent Simmons a34a62ae41 Create FeedSettings to replace FeedMetadata. Delete FeedMetadataFile since it's been replaced by FeedSettingsDatabase. 2026-03-07 12:04:08 -08:00
Brent Simmons 8c948bd63e Add FeedSettingsImporter for one-time import of feed metadata file to SQLite database. 2026-03-07 11:44:17 -08:00
Brent Simmons 0b6808f7b5 Make insertRow take a dictionary of [Column: Any] instead of [String: Any]. 2026-03-07 11:43:14 -08:00
Brent Simmons 2fde38350e Add insertRow so that the importer can write one row at a time instead of setting each column as a separate call. 2026-03-07 11:30:53 -08:00
Brent Simmons faba8e5615 Create FeedSettingsDatabase which replaces the feed metadata files. 2026-03-07 11:24:11 -08:00
Brent Simmons 61c49848ec Use AccountSettings instead of AccountMetadata. 2026-03-06 21:41:08 -08:00
Brent Simmons 50c5024115 Make AccountSettings take responsibility for importing old plist file and making sure account exists in the database. 2026-03-06 21:39:00 -08:00
Brent Simmons 6aba4439e7 Delete no-longer-used AccountMetadataFile. 2026-03-06 21:33:39 -08:00
Brent Simmons 2f047374f5 Rename AccountMetadata to AccountSettings. Persist to a SQLite database instead of to a plist. 2026-03-06 21:32:26 -08:00
Brent Simmons b09df86904 Add function to fetch an account's data all at once. 2026-03-06 21:31:08 -08:00