Show RSS feed title in HTML browser

RSS feed title will be displayed on top of the HTML browser when 'Unread' is selected in feed list.

PR #19604.
This commit is contained in:
Jay 2023-09-20 18:15:08 +08:00 committed by GitHub
parent 5e5c6aa7d8
commit f3b688217e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -508,6 +508,8 @@ void RSSWidget::handleCurrentArticleItemChanged(QListWidgetItem *currentItem, QL
u"<div style='background-color: \"%1\"; font-weight: bold; color: \"%2\";'>%3</div>"_s.arg(highlightedBaseColor, highlightedBaseTextColor, article->title());
if (article->date().isValid())
html += u"<div style='background-color: \"%1\";'><b>%2</b>%3</div>"_s.arg(alternateBaseColor, tr("Date: "), QLocale::system().toString(article->date().toLocalTime()));
if (m_feedListWidget->currentItem() == m_feedListWidget->stickyUnreadItem())
html += u"<div style='background-color: \"%1\";'><b>%2</b>%3</div>"_s.arg(alternateBaseColor, tr("Feed: "), article->feed()->title());
if (!article->author().isEmpty())
html += u"<div style='background-color: \"%1\";'><b>%2</b>%3</div>"_s.arg(alternateBaseColor, tr("Author: "), article->author());
html += u"</div>"