For tooltip use article.body if article.abstract is empty

This commit is contained in:
relikd
2019-03-15 00:08:19 +01:00
parent 039c7bc734
commit 3ace169549
3 changed files with 5 additions and 1 deletions

View File

@@ -67,7 +67,7 @@
item.title = [self shortArticleName]; item.title = [self shortArticleName];
item.enabled = (self.link.length > 0); item.enabled = (self.link.length > 0);
item.state = (self.unread && [UserPrefs defaultYES:@"feedTickMark"] ? NSControlStateValueOn : NSControlStateValueOff); item.state = (self.unread && [UserPrefs defaultYES:@"feedTickMark"] ? NSControlStateValueOn : NSControlStateValueOff);
item.toolTip = self.abstract; item.toolTip = (self.abstract ? self.abstract : self.body); // fall back to body (html)
item.representedObject = self.objectID; item.representedObject = self.objectID;
item.target = [self class]; item.target = [self class];
item.action = @selector(didClickOnMenuItem:); item.action = @selector(didClickOnMenuItem:);

View File

@@ -34,7 +34,9 @@
self.errorCount = 0; self.errorCount = 0;
int16_t n = self.errorCount + 1; // always increment errorCount (can be used to indicate bad feeds) int16_t n = self.errorCount + 1; // always increment errorCount (can be used to indicate bad feeds)
// TODO: remove logging // TODO: remove logging
#ifdef DEBUG
NSLog(@"ERROR: Feed download failed: %@ (errorCount: %d)", self.url, n); NSLog(@"ERROR: Feed download failed: %@ (errorCount: %d)", self.url, n);
#endif
if ([self.scheduled timeIntervalSinceNow] > 30) // forced, early update. Scheduled is still in the futute. if ([self.scheduled timeIntervalSinceNow] > 30) // forced, early update. Scheduled is still in the futute.
return; // Keep error counter low. Not enough time has passed (e.g., temporary server outage) return; // Keep error counter low. Not enough time has passed (e.g., temporary server outage)
NSTimeInterval retryWaitTime = pow(2, (n > 13 ? 13 : n)) * 60; // 2^N (between: 2 minutes and 5.7 days) NSTimeInterval retryWaitTime = pow(2, (n > 13 ? 13 : n)) * 60; // 2^N (between: 2 minutes and 5.7 days)

View File

@@ -123,7 +123,9 @@ static BOOL _nextUpdateIsForced = NO;
Called when schedule timer runs out (earliest @c .schedule date). Or if forced by user request. Called when schedule timer runs out (earliest @c .schedule date). Or if forced by user request.
*/ */
+ (void)updateTimerCallback { + (void)updateTimerCallback {
#ifdef DEBUG
NSLog(@"fired"); NSLog(@"fired");
#endif
BOOL updateAll = _nextUpdateIsForced; BOOL updateAll = _nextUpdateIsForced;
_nextUpdateIsForced = NO; _nextUpdateIsForced = NO;