summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/MainController.cpp8
-rw-r--r--Swift/Controllers/MainController.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index c4d34d8..2ae110b 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -184,6 +184,11 @@ void MainController::handleEventQueueLengthChange(int count) {
application_->getApplicationMessageDisplay()->setMessage(count == 0 ? "" : boost::lexical_cast<std::string>(count).c_str());
}
+void MainController::reconnectAfterError() {
+ performLoginFromCachedCredentials();
+ sendPresence(queuedPresence_);
+}
+
void MainController::handleChangeStatusRequest(StatusShow::Type show, const String &statusText) {
boost::shared_ptr<Presence> presence(new Presence());
if (show == StatusShow::None) {
@@ -287,6 +292,9 @@ void MainController::handleError(const ClientError& error) {
loginWindow_->setMessage(message);
}
logout();
+ if (rosterController_) {
+ //reconnectAfterError();
+ }
}
void MainController::handleCancelLoginRequest() {
diff --git a/Swift/Controllers/MainController.h b/Swift/Controllers/MainController.h
index db6a110..df6901d 100644
--- a/Swift/Controllers/MainController.h
+++ b/Swift/Controllers/MainController.h
@@ -77,6 +77,7 @@ namespace Swift {
virtual bool isMUC(const JID& muc) const;
void performLoginFromCachedCredentials();
+ void reconnectAfterError();
void setManagersEnabled(bool enabled);
Client* client_;
ChatWindowFactory* chatWindowFactory_;