Revision: 29623
          http://sourceforge.net/p/bibdesk/svn/29623
Author:   hofman
Date:     2025-09-23 14:49:36 +0000 (Tue, 23 Sep 2025)
Log Message:
-----------
only sort by size when there remain multiple sizes

Modified Paths:
--------------
    trunk/bibdesk/BDSKWebView.m

Modified: trunk/bibdesk/BDSKWebView.m
===================================================================
--- trunk/bibdesk/BDSKWebView.m 2025-09-23 14:42:13 UTC (rev 29622)
+++ trunk/bibdesk/BDSKWebView.m 2025-09-23 14:49:36 UTC (rev 29623)
@@ -285,8 +285,7 @@
     NSString *urlString = nil;
     if ([favicons count] > 1) {
         // get favicons of the preferred type
-        NSArray *sortDescriptors = @[[[NSSortDescriptor alloc] 
initWithKey:@"type" ascending:YES], [[NSSortDescriptor alloc] 
initWithKey:@"width" ascending:YES]];
-        [favicons sortUsingDescriptors:sortDescriptors];
+        [favicons sortUsingDescriptors:@[[[NSSortDescriptor alloc] 
initWithKey:@"type" ascending:YES]]];
         NSUInteger preferredType = [[[favicons firstObject] 
valueForKey:@"type"] unsignedIntegerValue];
         while ([favicons count] > 1) {
             if ([[[favicons lastObject] valueForKey:@"type"] 
unsignedIntegerValue] == preferredType)
@@ -295,6 +294,7 @@
         }
         if ([favicons count] > 1) {
             // get favicon with the preferred size
+            [favicons sortUsingDescriptors:@[[[NSSortDescriptor alloc] 
initWithKey:@"width" ascending:YES]]];
             NSInteger preferredSize = 16 * (NSInteger)[([[frame webView] 
window] ?: [[frame webView] hostWindow] ?: (id)[NSScreen mainScreen]) 
backingScaleFactor];
             for (NSDictionary *info in favicons) {
                 NSInteger width = [[info valueForKey:@"width"] integerValue];

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



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to