From ac1522baed408a7626bab9596d2fcd31c8aed351 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 Apr 2015 19:31:23 +0300 Subject: Request mail list automatically on start. --- src/game.cpp | 3 +++ src/gui/windows/mailwindow.cpp | 5 +++++ src/gui/windows/mailwindow.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/src/game.cpp b/src/game.cpp index 2693cec1d..e7ab0cb10 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -416,6 +416,9 @@ Game::Game() : initEngines(); chatWindow->postConnection(); +#ifdef EATHENA_SUPPORT + mailWindow->postConnection(); +#endif // Initialize beings if (actorManager) diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp index 6f0ce2987..cf42b3170 100644 --- a/src/gui/windows/mailwindow.cpp +++ b/src/gui/windows/mailwindow.cpp @@ -276,3 +276,8 @@ void MailWindow::mouseClicked(MouseEvent &event) } } } + +void MailWindow::postConnection() +{ + mailHandler->refresh(); +} diff --git a/src/gui/windows/mailwindow.h b/src/gui/windows/mailwindow.h index 2013461d5..7df4be23f 100644 --- a/src/gui/windows/mailwindow.h +++ b/src/gui/windows/mailwindow.h @@ -65,6 +65,8 @@ class MailWindow final : public Window, void mouseClicked(MouseEvent &event) override final; + void postConnection(); + private: std::vector mMessages; std::map mMessagesMap; -- cgit v1.2.3-70-g09d2