summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-26 02:00:31 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-26 02:00:31 +0300
commit651dee7fb3c45ed18c490dc039677daed1c33aa9 (patch)
tree0c544404cc19323c6ff9fb13f2c48f68a2501a14 /src/net
parent5b8c92a15a877bc05812c091ca1841cacf989f30 (diff)
downloadplus-651dee7fb3c45ed18c490dc039677daed1c33aa9.tar.gz
plus-651dee7fb3c45ed18c490dc039677daed1c33aa9.tar.bz2
plus-651dee7fb3c45ed18c490dc039677daed1c33aa9.tar.xz
plus-651dee7fb3c45ed18c490dc039677daed1c33aa9.zip
Allow request to load old mail messages by pages.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/mail2recv.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp
index 32d4f76c6..14ae54383 100644
--- a/src/net/eathena/mail2recv.cpp
+++ b/src/net/eathena/mail2recv.cpp
@@ -332,7 +332,7 @@ void Mail2Recv::processMailListPage(Net::MessageIn &msg)
mailWindow->setOpenType(fromInt(msg.readUInt8("open type"),
MailOpenTypeT));
const int cnt = msg.readUInt8("cnt");
- msg.readUInt8("isEnd");
+ const bool isEnd = msg.readUInt8("isEnd") != 0;
for (int f = 0; f < cnt; f ++)
{
MailMessage *const mail = new MailMessage;
@@ -347,6 +347,8 @@ void Mail2Recv::processMailListPage(Net::MessageIn &msg)
mail->title = msg.readString(-1, "title");
mailWindow->addMail(mail);
}
+ if (isEnd)
+ mailWindow->setLastPage();
}
void Mail2Recv::processReadMail(Net::MessageIn &msg)