Clickable update notifications

This commit is contained in:
Jaidyn Ann 2021-03-04 18:18:39 -06:00
parent b4cde0e09d
commit ea620f387a

View File

@ -103,12 +103,17 @@ Notifier::_SendUpdatedNotification()
feedNum << fUpdatedFeeds->CountItems();
notifyText.ReplaceAll("%n%", entryNum);
notifyText.ReplaceAll("%m%", feedNum);
notifyText.ReplaceAll("%m%", feedNum - 1);
notifyText.ReplaceAll("%source%",
((BString*)fUpdatedFeeds->ItemAt(0))->String());
notifyNew.SetTitle(notifyLabel);
notifyNew.SetContent(notifyText);
entry_ref feedsRef;
BEntry(((App*)be_app)->fPreferences->EntryDir()).GetRef(&feedsRef);
notifyNew.SetOnClickFile(&feedsRef);
notifyNew.Send();
}
@ -131,7 +136,7 @@ Notifier::_SendFailedNotification()
BString feedNum = "";
feedNum << fFailedFeeds->CountItems();
notifyText.ReplaceAll("%m%", feedNum);
notifyText.ReplaceAll("%m%", feedNum - 1);
notifyText.ReplaceAll("%source%",
((BString*)fFailedFeeds->ItemAt(0))->String());