Fix error log 'extractOptions unknown hint identifier'
This commit is contained in:
@@ -196,7 +196,8 @@
|
|||||||
if (self.articles.count == 0) {
|
if (self.articles.count == 0) {
|
||||||
img = [NSImage imageNamed:NSImageNameCaution];
|
img = [NSImage imageNamed:NSImageNameCaution];
|
||||||
} else if (self.hasIcon) {
|
} else if (self.hasIcon) {
|
||||||
img = [[NSImage alloc] initByReferencingURL:[self iconPath]];
|
NSData* data = [[NSData alloc] initWithContentsOfURL:[self iconPath]];
|
||||||
|
img = [[NSImage alloc] initWithData:data];
|
||||||
} else {
|
} else {
|
||||||
img = [NSImage imageNamed:RSSImageDefaultRSSIcon];
|
img = [NSImage imageNamed:RSSImageDefaultRSSIcon];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,13 @@
|
|||||||
return;
|
return;
|
||||||
self.currentDownload = [[NSURLRequest requestWithURL:self.remoteURL] downloadTask:^(NSURL * _Nullable path, NSError * _Nullable error) {
|
self.currentDownload = [[NSURLRequest requestWithURL:self.remoteURL] downloadTask:^(NSURL * _Nullable path, NSError * _Nullable error) {
|
||||||
if (error) path = nil; // will also nullify img
|
if (error) path = nil; // will also nullify img
|
||||||
NSImage *img = path ? [[NSImage alloc] initByReferencingURL:path] : nil;
|
NSImage *img;
|
||||||
|
if (path) {
|
||||||
|
NSData* data = [[NSData alloc] initWithContentsOfURL:path];
|
||||||
|
img = [[NSImage alloc] initWithData:data];
|
||||||
|
} else {
|
||||||
|
img = nil;
|
||||||
|
}
|
||||||
if (img.valid) {
|
if (img.valid) {
|
||||||
// move image to temporary destination, otherwise dataTask: will delete it.
|
// move image to temporary destination, otherwise dataTask: will delete it.
|
||||||
NSString *tmpFile = NSProcessInfo.processInfo.globallyUniqueString;
|
NSString *tmpFile = NSProcessInfo.processInfo.globallyUniqueString;
|
||||||
@@ -166,7 +172,8 @@
|
|||||||
if (self.canceled)
|
if (self.canceled)
|
||||||
return;
|
return;
|
||||||
NSURL *path = self.fileURL;
|
NSURL *path = self.fileURL;
|
||||||
NSImage *img = [[NSImage alloc] initByReferencingURL:path];
|
NSData* data = [[NSData alloc] initWithContentsOfURL:path];
|
||||||
|
NSImage* img = [[NSImage alloc] initWithData:data];
|
||||||
if (!img.valid) { path = nil; img = nil; }
|
if (!img.valid) { path = nil; img = nil; }
|
||||||
#if DEBUG && ENV_LOG_DOWNLOAD
|
#if DEBUG && ENV_LOG_DOWNLOAD
|
||||||
printf("ICON %1.0fx%1.0f %s\n", img.size.width, img.size.height, self.remoteURL.absoluteString.UTF8String);
|
printf("ICON %1.0fx%1.0f %s\n", img.size.width, img.size.height, self.remoteURL.absoluteString.UTF8String);
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>14603</string>
|
<string>14620</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.news</string>
|
<string>public.app-category.news</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
|||||||
@@ -216,7 +216,13 @@
|
|||||||
*/
|
*/
|
||||||
- (void)faviconDownload:(FaviconDownload*)sender didFinish:(nullable NSURL*)path {
|
- (void)faviconDownload:(FaviconDownload*)sender didFinish:(nullable NSURL*)path {
|
||||||
// Create image from favicon temporary file location or default icon if no favicon exists.
|
// Create image from favicon temporary file location or default icon if no favicon exists.
|
||||||
NSImage *img = path ? [[NSImage alloc] initByReferencingURL:path] : [NSImage imageNamed:RSSImageDefaultRSSIcon];
|
NSImage *img;
|
||||||
|
if (path) {
|
||||||
|
NSData* data = [[NSData alloc] initWithContentsOfURL:path];
|
||||||
|
img = [[NSImage alloc] initWithData:data];
|
||||||
|
} else {
|
||||||
|
img = [NSImage imageNamed:RSSImageDefaultRSSIcon];
|
||||||
|
}
|
||||||
self.view.favicon.image = img;
|
self.view.favicon.image = img;
|
||||||
self.faviconFile = path;
|
self.faviconFile = path;
|
||||||
[self downloadComplete];
|
[self downloadComplete];
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
[content setFrameSize: NSMakeSize(w, h)];
|
[content setFrameSize: NSMakeSize(w, h)];
|
||||||
|
|
||||||
// after content size, increase to window size
|
// after content size, increase to window size
|
||||||
w += 2 * PAD_WIN;
|
w += 2 * (NSInteger)PAD_WIN;
|
||||||
h += PAD_WIN + contentOffsetY; // the second PAD_WIN is already in contentOffsetY
|
h += PAD_WIN + contentOffsetY; // the second PAD_WIN is already in contentOffsetY
|
||||||
|
|
||||||
NSWindowStyleMask style = NSWindowStyleMaskTitled | NSWindowStyleMaskResizable | NSWindowStyleMaskFullSizeContentView;
|
NSWindowStyleMask style = NSWindowStyleMaskTitled | NSWindowStyleMaskResizable | NSWindowStyleMaskFullSizeContentView;
|
||||||
|
|||||||
Reference in New Issue
Block a user