summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-26 20:31:13 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-26 20:31:13 +0300
commit59e289090a6845f8b9d6a4a4c6067cf6280e3d20 (patch)
tree98f517e5298823ff122289b16e977001845ffba3 /src/gui/windows
parent7a94bb34d78f88c93e280da04dd8542b26686ed1 (diff)
downloadmv-59e289090a6845f8b9d6a4a4c6067cf6280e3d20.tar.gz
mv-59e289090a6845f8b9d6a4a4c6067cf6280e3d20.tar.bz2
mv-59e289090a6845f8b9d6a4a4c6067cf6280e3d20.tar.xz
mv-59e289090a6845f8b9d6a4a4c6067cf6280e3d20.zip
Fix moving to previous/next mail message in mail view window.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/mailwindow.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index 5536aecbc..ca11306ac 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -277,7 +277,8 @@ void MailWindow::viewNext(const int64_t id)
FOR_EACH (STD_VECTOR<MailMessage*>::iterator, it, mMessages)
{
MailMessage *message = *it;
- if ((message != nullptr) && message->id == id)
+ if (message != nullptr &&
+ message->id == id)
{
++ it;
if (it == mMessages.end())
@@ -290,7 +291,10 @@ void MailWindow::viewNext(const int64_t id)
mListBox->setSelected(mListBox->getSelected() + 1);
}
message = *it;
- mailHandler->readMessage(message->id);
+ if (mUseMail2)
+ mail2Handler->readMail(mOpenType, message->id);
+ else
+ mailHandler->readMessage(message->id);
return;
}
}
@@ -301,7 +305,8 @@ void MailWindow::viewPrev(const int64_t id)
FOR_EACH (STD_VECTOR<MailMessage*>::iterator, it, mMessages)
{
MailMessage *message = *it;
- if ((message != nullptr) && message->id == id)
+ if (message != nullptr &&
+ message->id == id)
{
if (it == mMessages.begin())
{
@@ -314,7 +319,10 @@ void MailWindow::viewPrev(const int64_t id)
}
-- it;
message = *it;
- mailHandler->readMessage(message->id);
+ if (mUseMail2)
+ mail2Handler->readMail(mOpenType, message->id);
+ else
+ mailHandler->readMessage(message->id);
return;
}
}