Revision: 15526 http://sourceforge.net/p/skim-app/code/15526 Author: hofman Date: 2025-06-23 14:32:52 +0000 (Mon, 23 Jun 2025) Log Message: ----------- Ignore recent document registation after applicationWillTerminate is called, as it will be ignored anyway. This will be called from windowwWillClose notifications, which comes after this.
Modified Paths: -------------- trunk/SKBookmarkController.h trunk/SKBookmarkController.m Modified: trunk/SKBookmarkController.h =================================================================== --- trunk/SKBookmarkController.h 2025-06-23 14:00:08 UTC (rev 15525) +++ trunk/SKBookmarkController.h 2025-06-23 14:32:52 UTC (rev 15526) @@ -62,6 +62,7 @@ NSDictionary<NSString *, NSToolbarItem *> *toolbarItems; NSArray<NSDictionary<NSString *, id> *> *bookmarksCache; BOOL needsBeginUpdates; + BOOL appIsTerminating; } @property (class, nonatomic, readonly) SKBookmarkController *sharedBookmarkController; Modified: trunk/SKBookmarkController.m =================================================================== --- trunk/SKBookmarkController.m 2025-06-23 14:00:08 UTC (rev 15525) +++ trunk/SKBookmarkController.m 2025-06-23 14:32:52 UTC (rev 15526) @@ -250,7 +250,7 @@ } - (BOOL)addRecentDocumentForURL:(NSURL *)fileURL pageIndex:(NSUInteger)pageIndex snapshots:(NSArray *)snapshots { - if (maxRecentDocumentsCount > 0 && fileURL) { + if (maxRecentDocumentsCount > 0 && fileURL && appIsTerminating == NO) { SKBookmark *info = [[SKBookmark alloc] initWithURL:fileURL pageIndex:pageIndex snapshots:snapshots label:nil]; if (info) { SKBookmark *oldInfo = [self recentDocumentAtURL:fileURL]; @@ -870,6 +870,7 @@ - (void)handleApplicationWillTerminateNotification:(NSNotification *)notification { [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(saveBookmarksData) object:nil]; [self saveBookmarksData]; + appIsTerminating = YES; } - (void)endEditing { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit