feat: use format "feed title: article title"

This commit is contained in:
relikd
2025-10-26 23:36:15 +01:00
parent 9f4de8fc8d
commit d164c6bcb0
3 changed files with 8 additions and 8 deletions

View File

@@ -805,7 +805,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 16684; CURRENT_PROJECT_VERSION = 16686;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = UY657LKNHJ; DEVELOPMENT_TEAM = UY657LKNHJ;
@@ -866,7 +866,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 16684; CURRENT_PROJECT_VERSION = 16686;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = UY657LKNHJ; DEVELOPMENT_TEAM = UY657LKNHJ;

View File

@@ -55,7 +55,7 @@ static NotificationType notifyType;
// or update count and show a new notification banner? // or update count and show a new notification banner?
if (newCount > oldCount) { // only notify if new feeds (quirk: will also trigger for option-click menu to mark unread) if (newCount > oldCount) { // only notify if new feeds (quirk: will also trigger for option-click menu to mark unread)
[self send:kNotifyIdGlobal [self send:kNotifyIdGlobal
title:nil title:APP_NAME
body:[NSString stringWithFormat:@"%ld unread articles", newCount]]; body:[NSString stringWithFormat:@"%ld unread articles", newCount]];
} }
} else { } else {
@@ -84,8 +84,8 @@ static NotificationType notifyType;
} }
[article.managedObjectContext obtainPermanentIDsForObjects:@[article] error:nil]; [article.managedObjectContext obtainPermanentIDsForObjects:@[article] error:nil];
[self send:article.notificationID [self send:article.notificationID
title:article.title title:article.feed.title
body:article.abstract ? article.abstract : article.body]; body:article.title];
} }
/// Close already posted notifications because they were opened via menu /// Close already posted notifications because they were opened via menu
@@ -102,8 +102,8 @@ static NotificationType notifyType;
/// @param identifier Used to identify a specific instance (and dismiss a previously shown notification). /// @param identifier Used to identify a specific instance (and dismiss a previously shown notification).
+ (void)send:(NSString *)identifier title:(nullable NSString *)title body:(nullable NSString *)body { + (void)send:(NSString *)identifier title:(nullable NSString *)title body:(nullable NSString *)body {
UNMutableNotificationContent *msg = [UNMutableNotificationContent new]; UNMutableNotificationContent *msg = [UNMutableNotificationContent new];
if (title) msg.title = title; if (title != nil) msg.title = title;
if (body) msg.body = body; if (body != nil) msg.body = body;
// common settings: // common settings:
// TODO: make sound configurable? // TODO: make sound configurable?
msg.sound = [UNNotificationSound defaultSound]; msg.sound = [UNNotificationSound defaultSound];

View File

@@ -95,7 +95,7 @@
case NotificationTypeDisabled: case NotificationTypeDisabled:
return NSLocalizedString(@"Notifications are disabled. You will not get any notifications even if you enable them in System Settings.", nil); return NSLocalizedString(@"Notifications are disabled. You will not get any notifications even if you enable them in System Settings.", nil);
case NotificationTypePerArticle: case NotificationTypePerArticle:
return NSLocalizedString(@"You will get a notification for each article (“Article Title: Article Content”). A click on the notification banner opens the article link and marks the item as read.", nil); return NSLocalizedString(@"You will get a notification for each article (“Feed Title: Article Title”). A click on the notification banner opens the article link and marks the item as read.", nil);
case NotificationTypePerFeed: case NotificationTypePerFeed:
return NSLocalizedString(@"You will get a notification for each feed whenever one or more new articles are published (“Feed Title: X unread articles”). A click on the notification banner will open all unread articles of that feed.", nil); return NSLocalizedString(@"You will get a notification for each feed whenever one or more new articles are published (“Feed Title: X unread articles”). A click on the notification banner will open all unread articles of that feed.", nil);
case NotificationTypeGlobal: case NotificationTypeGlobal: