Do some preparations for #141.

This commit is contained in:
Martin Rotter 2017-10-23 08:57:12 +02:00
parent 6a2a0893f8
commit 1b7c4f68b3
2 changed files with 9 additions and 0 deletions

View File

@ -171,6 +171,10 @@ void FeedMessageViewer::toggleShowOnlyUnreadFeeds() {
}
}
void FeedMessageViewer::displayMessage(const Message& message, RootItem* root) {
m_messagesBrowser->loadMessage(message, root);
}
void FeedMessageViewer::createConnections() {
// Filtering & searching.
connect(m_toolBarMessages, &MessagesToolBar::messageSearchPatternChanged, m_messagesView, &MessagesView::searchMessages);
@ -189,6 +193,8 @@ void FeedMessageViewer::createConnections() {
&MessagesModel::setMessageImportantById);
#endif
connect(m_messagesView, &MessagesView::currentMessageChanged, this, &FeedMessageViewer::displayMessage);
// If user selects feeds, load their messages.
connect(m_feedsView, &FeedsView::itemSelected, m_messagesView, &MessagesView::loadItem);
connect(m_feedsView, &FeedsView::requestViewNextUnreadMessage, m_messagesView, &MessagesView::selectNextUnreadItem);

View File

@ -67,6 +67,9 @@ class FeedMessageViewer : public TabContent {
// Toggles displayed feeds.
void toggleShowOnlyUnreadFeeds();
private slots:
void displayMessage(const Message& message, RootItem* root);
protected:
void initialize();