diff --git a/plugins/FeedReader/gui/FeedReaderDialog.cpp b/plugins/FeedReader/gui/FeedReaderDialog.cpp index bff723fea..cc1b40fe3 100644 --- a/plugins/FeedReader/gui/FeedReaderDialog.cpp +++ b/plugins/FeedReader/gui/FeedReaderDialog.cpp @@ -668,6 +668,11 @@ void FeedReaderDialog::messageTabInfoChanged(QWidget *widget) return; } + if (messageWidget != mMessageWidget && messageWidget->feedId().empty()) { + messageWidget->deleteLater(); + return; + } + ui->messageTabWidget->setTabText(index, messageWidget->feedName(true)); ui->messageTabWidget->setTabIcon(index, messageWidget->feedIcon()); } diff --git a/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp b/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp index b1c587eba..ee6d42484 100644 --- a/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp +++ b/plugins/FeedReader/gui/FeedReaderMessageWidget.cpp @@ -214,12 +214,14 @@ void FeedReaderMessageWidget::setFeedId(const std::string &feedId) } else { mFeedId.clear(); } + } else { + mFeedName.clear(); } - emit feedMessageChanged(this); - updateMsgs(); updateCurrentMessage(); + + emit feedMessageChanged(this); } QString FeedReaderMessageWidget::feedName(bool withUnreadCount) @@ -405,7 +407,7 @@ void FeedReaderMessageWidget::feedChanged(const QString &feedId, int type) } if (type == NOTIFY_TYPE_DEL) { - deleteLater(); + setFeedId(""); return; } diff --git a/plugins/FeedReader/services/p3FeedReaderThread.cc b/plugins/FeedReader/services/p3FeedReaderThread.cc index 69e7c5741..5c6321ed9 100644 --- a/plugins/FeedReader/services/p3FeedReaderThread.cc +++ b/plugins/FeedReader/services/p3FeedReaderThread.cc @@ -276,6 +276,7 @@ RsFeedReaderErrorState p3FeedReaderThread::download(const RsFeedReaderFeed &feed std::string contentType = CURL.contentType(); if (isContentType(contentType, "text/xml") || + isContentType(contentType, "text/html") || isContentType(contentType, "application/rss+xml") || isContentType(contentType, "application/xml") || isContentType(contentType, "application/xhtml+xml") || @@ -900,7 +901,15 @@ RsFeedReaderErrorState p3FeedReaderThread::process(const RsFeedReaderFeed &feed, item->link.erase(sidStart, sidEnd - sidStart); } - xml.getChildText(node, "author", item->author); + if (feedFormat == FORMAT_ATOM) { + /* ... */ + xmlNodePtr author = xml.findNode(node->children, "author", false); + if (author) { + xml.getChildText(node, "name", item->author); + } + } else { + xml.getChildText(node, "author", item->author); + } switch (feedFormat) { case FORMAT_RSS: