Revision: 16760
          http://sourceforge.net/p/skim-app/code/16760
Author:   hofman
Date:     2026-10-31 15:56:26 +0000 (Sat, 31 Oct 2026)
Log Message:
-----------
use setter for method to cache and clear cached fileURL

Modified Paths:
--------------
    trunk/SKBookmark.m

Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m  2026-10-31 15:50:47 UTC (rev 16759)
+++ trunk/SKBookmark.m  2026-10-31 15:56:26 UTC (rev 16760)
@@ -526,21 +526,19 @@
     return SKBookmarkTypeBookmark;
 }
 
-- (void)clearCachedFileURL {
-    cachedFileURL = nil;
+- (void)setCachedFileURL:(NSURL *)fileURL {
+    cachedFileURL = fileURL;
+    if (fileURL) {
+        __weak typeof(self) weakSelf = self;
+        dispatch_async(dispatch_get_main_queue(), ^{ [weakSelf 
setCachedFileURL:nil]; });
+    }
 }
 
-- (void)cacheFileURL:(NSURL *)fileURL {
-    cachedFileURL = fileURL ?: (id)[NSNull null];
-    __weak typeof(self) weakSelf = self;
-    dispatch_async(dispatch_get_main_queue(), ^{ [weakSelf 
clearCachedFileURL]; });
-}
-
 - (NSURL *)fileURL {
     NSURL *fileURL = nil;
     if (cachedFileURL == nil) {
         fileURL = [alias fileURLNoUI];
-        [self cacheFileURL:fileURL];
+        [self setCachedFileURL:fileURL ?: (id)[NSNull null]];
     } else if ([cachedFileURL isEqual:[NSNull null]] == NO) {
         fileURL = cachedFileURL;
     }
@@ -562,7 +560,7 @@
     } else {
         fileURL = [alias fileURL];
         if (cachedFileURL == nil)
-            [self cacheFileURL:fileURL];
+            [self setCachedFileURL:fileURL ?: (id)[NSNull null]];
         else if (fileURL)
             cachedFileURL = fileURL;
     }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to