Commit Graph

264 Commits

Author SHA1 Message Date
Brent Simmons
0a45dda375 Create SearchFeedDelegate. Make searching synchronous, since it’s fast enough. 2019-02-24 19:22:16 -08:00
Brent Simmons
efe8a4ab15 Implement search — fetch articles matching a search string from the database. 2019-02-18 22:29:43 -08:00
Daniel Jalkut
ddb0ee21b6 Quiet warnings/errors from Xcode 10.2 about redundant public attributes on methods implemented inside public extensions. 2019-02-12 10:05:51 -05:00
Brent Simmons
6f41b2a728 Queue saving to disk, in Account, even during refresh. 2019-02-07 21:29:05 -08:00
Brent Simmons
aadf4ec09f Don’t set feed.editedName when importing OPML in Account. 2019-02-06 21:17:17 -08:00
Brent Simmons
ddccbdf610 Add addFeed and addFeeds to the Container protocol. This was confusing before. Now you can add directly to a Folder or Account. 2019-02-05 21:48:32 -08:00
Brent Simmons
448293a836 Set feed.title from the OPML — don’t just leave it blank. 2019-02-02 18:08:01 -08:00
Brent Simmons
f5d6e7e8fa Fix bug where empty folders would be lost between runs of the app. 2019-01-27 21:42:58 -08:00
Brent Simmons
d69058c10c Fix a couple first-run startup bugs. 2018-09-26 22:05:35 -07:00
Brent Simmons
7026eae899 Skip writing OPML file to disk during startup. Structure-changed notices happen during startup as the object graph is created, but it doesn’t mean that there’s a change that requires saving to disk. 2018-09-16 20:02:24 -07:00
Brent Simmons
1c3dca4d9b Update unreadCount for an Account only when one of its feeds changes its unreadCount. 2018-09-16 19:07:07 -07:00
Brent Simmons
a914b3949b Made launch performance *much* faster for large (thousands of feeds) subscriptions list. Also: split container.children in container.topLevelFeeds and container.folders. This simplifies a bunch of things, and makes some things faster. 2018-09-16 17:54:42 -07:00
Brent Simmons
6b6d393b3d Delete some dead code. 2018-09-16 13:08:44 -07:00
Brent Simmons
3d45231494 Stop using urlToFeedDictionary. Feeds don’t have to be uniqued. 2018-09-16 13:04:42 -07:00
Brent Simmons
4010b4cb2a On startup, import from AccountData.plist one last time, then rename it to AccountData-old.plist. On subsequent startups, import using Subscriptions.opml. 2018-09-16 12:42:46 -07:00
Brent Simmons
823d83c942 Write to disk on display-name-change only if it’s a Folder, since Feed names are stored in ODB. 2018-09-15 12:08:57 -07:00
Brent Simmons
d0df791b93 Skip writing to disk when feed setting changes, since we’re writing OPML now and storing feed settings in ODB. 2018-09-15 12:06:19 -07:00
Brent Simmons
47cf018143 Store feed.unreadCount with the Account rather than the feed. This is part of making it so that feeds no longer have to be uniqued. 2018-09-14 22:06:03 -07:00
Brent Simmons
3f1f4fd24c Write Subscriptions.opml to disk. 2018-09-14 13:25:38 -07:00
Brent Simmons
b8546d8e8b Don't store account.unreadCount in Settings.odb. Don’t rewrite AccountData.plist when feed.contentHash changes. 2018-09-14 13:12:55 -07:00
Brent Simmons
679e6f6c0b Give Feed a weak account rather than accountID. 2018-09-13 22:37:40 -07:00
Brent Simmons
b5b42b8df6 Stop storing unreadCount for Feed and Folder objects on disk, since they’re fast to fetch at startup. Also, give Feed an ODBRawValueTable for metadata storage. 2018-09-13 22:25:10 -07:00
Brent Simmons
b7e9fbf2a6 Stop saving account’s unread count to disk — no need. It gets calculated at startup plenty fast enough. 2018-09-13 21:25:35 -07:00
Brent Simmons
4bc6c7d5db Start using ODB code with Account. Store the unread count in the settings database. 2018-09-12 22:28:21 -07:00
Brent Simmons
25ff76e1e5 Fix a performance bug when fetching all unread articles. When validating unread counts, it was looping through the entire set of articles once per feed. Now it loops through articles just once, for a major performance boost with lots of feeds and/or lots of unread articles. 2018-09-10 22:08:38 -07:00
Brent Simmons
cfb3bd706e Use new hash-into function instead of calculating hashValue. WIP on #402. 2018-08-25 11:54:58 -07:00
Brent Simmons
fc338d5371 Move Feed from Articles.framework to Account.framework. 2018-07-28 12:16:14 -07:00
Brent Simmons
b7575c687c Rename Data.framework to Articles.framework. Rename Database.framework to ArticlesDatabase.framework. 2018-07-23 18:29:08 -07:00
Olof Hellman
c91f4621e1 Merge remote-tracking branch 'brentsimmons/master' 2018-03-04 18:43:49 -08:00
Brent Simmons
7def2ae8d0 Fix bug where deleting from the sidebar would not stick across runs of the app sometimes — whatever you deleted could come back. 2018-02-24 15:54:32 -08:00
Olof Hellman
71005b56af support for "make new feed" 2018-02-20 00:26:46 -08:00
Brent Simmons
c80e3e86de Don’t save an Account to disk during a refresh session. Wait till it’s over. 2018-02-17 18:02:40 -08:00
Brent Simmons
64647c73c6 Use a coalescing queue (instead of a Timer) in Account for saving to disk. 2018-02-17 15:38:54 -08:00
Brent Simmons
2f21dbf6be Remove extraneous get { from a bunch of read-only accessors. 2018-02-14 13:14:25 -08:00
Brent Simmons
a13d21395e Fetch starred articles for the Starred smart feed. 2018-02-11 12:07:55 -08:00
Brent Simmons
5aeb914ab6 Fetch articles for the Today smart feed. 2018-02-10 17:37:47 -08:00
Brent Simmons
00cf3934e5 Add fetchUnreadArticles method to Account, which will be used by the All Unread smart feed. 2018-02-10 13:00:16 -08:00
Brent Simmons
a6db249ab6 Add ArticleFetcher protocol. Add Feed and Folder extensions for it. 2018-02-04 10:57:41 -08:00
Daniel Jalkut
d7f13ca4be Change from flatMap to new compactMap rename in Xcode 9.3. 2018-01-29 11:19:54 -05:00
Brent Simmons
f109237bfa Handle feed renames in the inspector. Handle multiple selection. Fix #137. 2018-01-23 21:49:33 -08:00
Brent Simmons
6b059671f5 Make progress on reloading timeline when feed updates. 2018-01-17 17:28:09 -08:00
Brent Simmons
8f9575ee84 Remove assertion that wasn’t valid in some situations. Fix #283. 2017-12-29 10:13:11 -08:00
Brent Simmons
0b2d7c6733 Validate unread counts on fetching articles. Fix #274. 2017-12-26 11:27:55 -08:00
Brent Simmons
23769bc391 Add AccountDelegate.accountDidInitialize method, so that the delegate can set the account’s nameForDisplay before anything else happens. Fix #247. 2017-12-19 17:48:30 -08:00
Brent Simmons
5b01f04afe Save to disk right after importing OPML. Fix #249. 2017-12-18 21:46:35 -08:00
Brent Simmons
3eb95ce63d Fix OPML import performance regression. Fix #238. 2017-12-11 23:12:54 -08:00
Brent Simmons
a488683550 Refresh all after importing OPML. Fix #59. 2017-12-03 12:54:51 -08:00
Brent Simmons
0c176eccd0 Fetch all unread counts at startup. This is done with a single SQL call, and it’s done in the background, so performance hit should not be noticeable. Fix #138. 2017-12-03 11:57:53 -08:00
Brent Simmons
3da2521e8e When adding a feed, update it right away rather than waiting for the next Refresh. Fix #147. Fix #215. 2017-12-02 17:47:08 -08:00
Brent Simmons
e026e159d1 Rebuild the feed dictionary at appropriate times. Fix #169. 2017-11-25 18:05:20 -08:00
Brent Simmons
68c01491fc Note when feed settings change and update the sidebar cells. 2017-11-25 13:48:14 -08:00
Brent Simmons
55166e0979 Update a Feed with settings taken from the raw feed. (Some Feeds had no homePageURL set, which meant, in most cases, no favicons.) 2017-11-25 12:17:49 -08:00
Brent Simmons
bd8b7c6ed9 Implement debugDropConditionalGetInfo command. Fix #197. 2017-11-25 11:13:15 -08:00
Brent Simmons
1864f60e0b Save iconURL and faviconURL in Feed when found in ParsedFeed. 2017-11-19 22:38:42 -08:00
Brent Simmons
ffaa55c50c Implement mark-everywhere-as-read. 2017-11-19 16:28:26 -08:00
Brent Simmons
9c571271e6 Create SmartFeed class. It’s for Unread and Starred pseudo-feeds — and will also be used later on by predicate-based smart feeds. 2017-11-19 15:40:02 -08:00
Brent Simmons
83cee90929 Fix a couple bugs in PseudoFeed. Make callback for fetching unread count @escaping. 2017-11-19 12:45:35 -08:00
Brent Simmons
e681007bbe Add TodayFeedDelegate. Start work on fetching unread count for Today pseudo-feed. 2017-11-19 12:12:43 -08:00
Brent Simmons
1e713e3bfd Update Account unread count when BatchUpdate did perform. 2017-11-15 13:26:10 -08:00
Brent Simmons
9f56030b79 Calculate the Account’s unread count by looking at the set of flattened feeds — this way a given feed (which can occur more than once) is counted only once. Fix #101. 2017-11-11 19:34:10 -08:00
Brent Simmons
9818278c9b Make undo deleting feeds/folders work. 2017-11-05 12:14:36 -08:00
Brent Simmons
e16911b363 Make deleting work. Can’t undo yet. But now everything is messed-up because of an AnyHashable casting bug. Don’t run this build. 2017-11-04 22:51:14 -07:00
Brent Simmons
ef303c0c38 Make progress on deleting and especially undoing delete. 2017-11-04 19:03:47 -07:00
Brent Simmons
f9b3eeb4d7 Switch macOS deployment target to 10.13. Get MarkAllReadCommand working as an undoable command. 2017-10-29 11:14:10 -07:00
Brent Simmons
c101d9dd04 Maintain url-to-feed and feedID-to-feed dictionaries to make lookups faster. This makes OPML importing very fast. 2017-10-22 11:08:51 -07:00
Brent Simmons
649f62207f Fix OPML importing. 2017-10-21 21:00:21 -07:00
Brent Simmons
d512908b6f Use @discardableResult with addFeed. 2017-10-21 16:32:29 -07:00
Brent Simmons
da1b7a6c7b Post children-did-change notification after adding a feed. 2017-10-21 16:06:25 -07:00
Brent Simmons
aca8acea7c Update sidebar when adding a folder. 2017-10-19 13:27:59 -07:00
Brent Simmons
3812c216b2 Show unread count in window title. 2017-10-18 21:53:45 -07:00
Brent Simmons
2383ecd480 Implement ensureFolder — it actually creates and adds a folder and makes sure account is saved to disk. 2017-10-18 19:46:35 -07:00
Brent Simmons
31947854c0 Add AccountDelegate methods for reading and writing a userInfo dictionary that’s stored on disk in the same file as the rest of the Account info. Save account unreadCount with the disk dictionary. Mark an account as dirty when any descendant changes an unread count. 2017-10-18 19:14:40 -07:00
Brent Simmons
39599a43f3 Make hasAtLeastOneFeed() a Container protocol function with a default implementation. Scrap Account’s feedIDDictionary, since it’s not needed. (Well, profiling may tell us later to bring it back.) 2017-10-18 18:45:09 -07:00
Brent Simmons
fe29ccd2ed Show unread count in dock badge. Force-update unread counts at startup. 2017-10-18 18:37:45 -07:00
Brent Simmons
3ea60cb461 Handle unread count change notifications in Folder. Update the unread count when needed. 2017-10-13 06:58:15 -07:00
Brent Simmons
505f4bcdba Handle unread count did change notification in Account. 2017-10-13 06:50:33 -07:00
Brent Simmons
4897181909 Avoid a compiler bug with constrained Set extensions. Add a notification observation to Account when unread count changes. 2017-10-12 21:02:27 -07:00
Brent Simmons
165e74a3f3 Refactor status change handling in Account. 2017-10-10 13:23:12 -07:00
Brent Simmons
f5a5bf91b2 Update unread counts for feeds when statuses change. 2017-10-09 21:54:08 -07:00
Brent Simmons
77042f67b5 Include updated feeds in StatusesDidChange notification, so that updating unread counts will work. 2017-10-08 22:25:33 -07:00
Brent Simmons
6572631866 Update the timeline cell when an article’s status changes. 2017-10-08 21:06:25 -07:00
Brent Simmons
8aa3746cb8 Add code for fetching articles for the timeline. Doesn’t actually work yet, though, for some reason. 2017-10-08 18:58:15 -07:00
Brent Simmons
1b44591692 Save new and updated articles to the database. 2017-10-08 01:54:37 -07:00
Brent Simmons
ca611623aa Simplify Container and its function implementations. 2017-10-07 21:41:21 -07:00
Brent Simmons
c52eb024ab Avoid resetting the save timer so often during a refresh session. Instead just remove it (if refreshing) and add it back when the refresh session ends. 2017-10-07 20:24:58 -07:00
Brent Simmons
0ba557736e Avoid saving account to disk during a refresh session. Reschedule the timer and do it later. 2017-10-07 20:11:17 -07:00
Brent Simmons
d8e723db46 Fix typo — send correct notification on account finishing refresh. 2017-10-07 18:31:34 -07:00
Brent Simmons
ade76d6405 Save to disk when needed. Coalesce writing, so it doesn’t happen over and over during a refresh session. 2017-10-07 18:15:42 -07:00
Brent Simmons
bed43dd3d6 Call the completion block in Account.update, so the refresher can do its thing properly. Also: update ToDo. 2017-10-07 17:53:37 -07:00
Brent Simmons
c6f683c34c Make Account, rather than its delegate, watch for refresh progress changes. This way the delegate doesn’t have to be inited with its Account. 2017-10-07 17:43:10 -07:00
Brent Simmons
b77569f38b Create and use CombinedRefreshProgress, which reports refresh progress across all accounts. Used by the status view. 2017-10-07 17:20:19 -07:00
Brent Simmons
5d8aa94dc3 Keep track of refresh beginning and finishing. Validate the refreshAll command (menu, toolbar). 2017-10-07 14:40:14 -07:00
Brent Simmons
83231ed373 Fix some build errors. 2017-10-02 13:15:07 -07:00
Brent Simmons
cb4027a951 Fix some build errors. 2017-10-01 11:28:44 -07:00
Brent Simmons
04612049f5 Make progress on adding feeds. 2017-10-01 10:59:35 -07:00
Brent Simmons
a910841c65 Add createFeed method. 2017-09-30 16:56:48 -07:00
Brent Simmons
3a4e545e22 Fix build errors in Account.framework. 2017-09-28 13:16:47 -07:00
Brent Simmons
1ec3484a95 Init Folder with an Account rather than an accountID. 2017-09-28 06:53:01 -07:00
Brent Simmons
48543bcfd6 Make progress reading/writing Account feeds and folders to disk. 2017-09-27 13:29:05 -07:00
Brent Simmons
55967f8731 Fix some build errors. 2017-09-26 21:43:40 -07:00
Brent Simmons
2978d4420b Start work on adding feeds and folders. 2017-09-25 13:31:36 -07:00
Brent Simmons
8767aa3178 Continue work on non-optional article.status. 2017-09-19 08:07:06 -07:00
Brent Simmons
b28a849af6 Continue march toward non-optional article.status. 2017-09-18 22:00:35 -07:00
Brent Simmons
92a60d8f06 Continue fixing build errors. 2017-09-17 17:03:58 -07:00
Brent Simmons
0336e30b0d Continue to fix build errors. 2017-09-17 16:30:45 -07:00
Brent Simmons
6631a9c2f8 Continue fixing build errors. 2017-09-17 13:07:55 -07:00
Brent Simmons
c0ce68e64b Fix some build errors. 2017-09-17 12:54:08 -07:00
Brent Simmons
1c63e868c9 Delete dead code. 2017-09-17 12:20:59 -07:00
Brent Simmons
121fbf3c27 Move AccountManager to Account.framework. 2017-09-17 12:20:32 -07:00
Brent Simmons
e78fc0d696 Get Account.framework building. 2017-09-17 12:08:50 -07:00
Brent Simmons
4bb0325c45 Delete superseded code. 2017-09-17 11:32:58 -07:00
Brent Simmons
ba8d2c81e8 Create AccountDelegate. The actual implementation for each different type of Account will conform to AccountDelegate. 2017-09-16 15:30:26 -07:00
Brent Simmons
5715d2f221 Move Folder and Container from Data to Account. 2017-09-16 15:25:38 -07:00
Brent Simmons
6a4fd38056 Continue mess-making. Start Account framework. 2017-09-07 20:41:25 -07:00