feat: use format "feed title: article title"
This commit is contained in:
@@ -55,7 +55,7 @@ static NotificationType notifyType;
|
||||
// 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)
|
||||
[self send:kNotifyIdGlobal
|
||||
title:nil
|
||||
title:APP_NAME
|
||||
body:[NSString stringWithFormat:@"%ld unread articles", newCount]];
|
||||
}
|
||||
} else {
|
||||
@@ -84,8 +84,8 @@ static NotificationType notifyType;
|
||||
}
|
||||
[article.managedObjectContext obtainPermanentIDsForObjects:@[article] error:nil];
|
||||
[self send:article.notificationID
|
||||
title:article.title
|
||||
body:article.abstract ? article.abstract : article.body];
|
||||
title:article.feed.title
|
||||
body:article.title];
|
||||
}
|
||||
|
||||
/// 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).
|
||||
+ (void)send:(NSString *)identifier title:(nullable NSString *)title body:(nullable NSString *)body {
|
||||
UNMutableNotificationContent *msg = [UNMutableNotificationContent new];
|
||||
if (title) msg.title = title;
|
||||
if (body) msg.body = body;
|
||||
if (title != nil) msg.title = title;
|
||||
if (body != nil) msg.body = body;
|
||||
// common settings:
|
||||
// TODO: make sound configurable?
|
||||
msg.sound = [UNNotificationSound defaultSound];
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
case NotificationTypeDisabled:
|
||||
return NSLocalizedString(@"Notifications are disabled. You will not get any notifications even if you enable them in System Settings.", nil);
|
||||
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:
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user