Skip to content

Commit

Permalink
Do some preparations for #141.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Rotter committed Oct 23, 2017
1 parent 6a2a089 commit 1b7c4f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/feedmessageviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions src/gui/feedmessageviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 1b7c4f6

Please sign in to comment.