diff options
Diffstat (limited to 'board.cpp')
-rw-r--r-- | board.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -7,6 +7,7 @@ #include "action.h" #include "fetchconfigaction.h" #include "fetchforumsaction.h" +#include "loginaction.h" #include "xmlrpcinterface.h" #include "board.h" @@ -138,7 +139,7 @@ QVariant Board::getLoginInfo(const QString &key) const void Board::login(const QString &username, const QString &password) { - // TODO + enqueueAction(new LoginAction(username, password, this)); } void Board::logout() @@ -255,6 +256,14 @@ void Board::notifyLogin(const QMap<QString, QVariant> &info) _loginInfo = info; qDebug() << "Now logged in as" << _loginInfo["username"].toString(); emit loggedInChanged(); + if (getConfig("last_forums_fetch_logged_in") != "1") { + // Forum list is probably outdated, because we fetched it while + // we were logged out. + if (_iface->isAccessible()) { + qDebug() << "Fetching forums because of login"; + enqueueAction(new FetchForumsAction(this)); + } + } } else { // Double login? _loginInfo = info; |