4 Commits

Author SHA1 Message Date
relikd
26f95c2b13 chore: bump version 2026-01-11 19:36:55 +01:00
relikd
a08898311c fix: reschedule update after system sleep (fixes #26) 2026-01-11 19:33:59 +01:00
relikd
6a5ca09754 fix: limit schedule timer tolerance to 10 min 2026-01-11 19:30:45 +01:00
relikd
1de44071aa fix: schedule update if refresh interval changes 2026-01-11 19:29:09 +01:00
4 changed files with 29 additions and 5 deletions

View File

@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.6.1] 2026-01-11
### Fixed
- Reschedule update timer after changing the refresh interval of a feed
- Reschedule update timer after system sleep (fixes #26)
## [1.6.0] 2025-12-13
### Added
- *UI:* Limit content length for article tooltips. (fixes #25)
@@ -261,6 +267,7 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
Initial release
[1.6.1]: https://github.com/relikd/baRSS/compare/v1.6.0...v1.6.1
[1.6.0]: https://github.com/relikd/baRSS/compare/v1.5.5...v1.6.0
[1.5.5]: https://github.com/relikd/baRSS/compare/v1.5.4...v1.5.5
[1.5.4]: https://github.com/relikd/baRSS/compare/v1.5.3...v1.5.4

View File

@@ -6,7 +6,7 @@ CODE_SIGN_IDENTITY = Apple Development
ENABLE_HARDENED_RUNTIME = YES
MACOSX_DEPLOYMENT_TARGET = 10.14
MARKETING_VERSION = 1.6.0
MARKETING_VERSION = 1.6.1
PRODUCT_NAME = baRSS
PRODUCT_BUNDLE_IDENTIFIER = de.relikd.baRSS
CURRENT_PROJECT_VERSION = 17752
CURRENT_PROJECT_VERSION = 17772

View File

@@ -110,13 +110,26 @@ static _Atomic(NSUInteger) _queueSize = 0;
dispatch_once(&onceToken, ^{
_timer = [NSTimer timerWithTimeInterval:NSTimeIntervalSince1970 target:[self class] selector:@selector(updateTimerCallback) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes];
// technically not the right place to register. But since it is run once, its easier than somewhere else.
[NSWorkspace.sharedWorkspace.notificationCenter addObserver:[self class] selector:@selector(didWakeAfterSleep) name:NSWorkspaceDidWakeNotification object:nil];
});
if (!nextTime)
nextTime = [NSDate distantFuture];
NSTimeInterval tolerance = [nextTime timeIntervalSinceNow] * 0.15;
_timer.tolerance = (tolerance < 1 ? 1 : tolerance); // at least 1 sec
int tolerance = (int)([nextTime timeIntervalSinceNow] * 0.15);
tolerance = (tolerance < 1 ? 1 : tolerance > 600 ? 600 : tolerance); // at least 1 sec, upto 10 min
_timer.tolerance = tolerance;
_timer.fireDate = nextTime;
PostNotification(kNotificationScheduleTimerChanged, nil);
#ifdef DEBUG
NSLog(@"schedule timer: %@ (+/- %d sec)", nextTime, tolerance);
#endif
}
+ (void)didWakeAfterSleep {
#ifdef DEBUG
NSLog(@"did wake from sleep");
#endif
[UpdateScheduler scheduleNextFeed];
}
/// Called when schedule timer runs out (earliest @c .schedule date). Or if forced by user.

View File

@@ -114,11 +114,15 @@
Interval intv = [NSDate intervalForPopup:self.view.refreshUnit andField:self.view.refreshNum];
[self.feedGroup setNameIfChanged:self.view.name.stringValue];
[f.meta setRefreshIfChanged:intv];
if (self.memFeed) {
if (self.memFeed) { // newly created
[self.memFeed copyValuesTo:f ignoreError:YES];
if (self.faviconFile) // only if downloaded anything (nil deletes icon!)
[f setNewIcon:self.faviconFile];
self.faviconFile = nil;
} else { // updating existing feed meta
if (f.meta.scheduled == nil || f.meta.scheduled.timeIntervalSinceNow > f.meta.refresh) {
[f.meta scheduleNow:f.meta.refresh];
}
}
}