diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/mailhandler.cpp | 15 | ||||
-rw-r--r-- | src/resources/notifications.h | 8 | ||||
-rw-r--r-- | src/resources/notifytypes.h | 2 |
3 files changed, 21 insertions, 4 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index e40d34e17..effaf9cf2 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -219,10 +219,17 @@ void MailHandler::processSetAttachmentAck(Net::MessageIn &msg) void MailHandler::processDeleteAck(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - - msg.readInt32("message id"); - msg.readInt16("fail flag"); + const int mail = msg.readInt32("message id"); + const int flag = msg.readInt16("fail flag"); + if (flag) + { + NotifyManager::notify(NotifyTypes::MAIL_DELETE_ERROR); + } + else + { + NotifyManager::notify(NotifyTypes::MAIL_DELETE_OK); + mailWindow->removeMail(mail); + } } void MailHandler::processMailReturn(Net::MessageIn &msg) diff --git a/src/resources/notifications.h b/src/resources/notifications.h index 0aa9d1c08..fe193d026 100644 --- a/src/resources/notifications.h +++ b/src/resources/notifications.h @@ -591,6 +591,14 @@ namespace NotifyManager // TRANSLATORS: notification message N_("Message return success."), NotifyFlags::EMPTY}, + {"mail delete error", + // TRANSLATORS: notification message + N_("Message deletion failed."), + NotifyFlags::EMPTY}, + {"mail delete ok", + // TRANSLATORS: notification message + N_("Message successfully deleted."), + NotifyFlags::EMPTY}, }; } // namespace NotifyManager #endif // RESOURCES_NOTIFICATIONS_H diff --git a/src/resources/notifytypes.h b/src/resources/notifytypes.h index 36792b6b9..d80689a76 100644 --- a/src/resources/notifytypes.h +++ b/src/resources/notifytypes.h @@ -166,6 +166,8 @@ namespace NotifyTypes MAIL_ATTACH_MONEY_ERROR, MAIL_RETURN_ERROR, MAIL_RETURN_OK, + MAIL_DELETE_ERROR, + MAIL_DELETE_OK, TYPE_END }; |