From 11b38f8479650b7f66a818d4cd6665e8445c82a1 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Tue, 25 May 2010 14:35:57 +0100
Subject: Don't attempt to come back from auto-away when you weren't.

Resolves: #379

diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index c2d31d6..596edd2 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -291,6 +291,10 @@ void MainController::handleInputIdleChanged(bool idle) {
 		}
 	}
 	else {
+		if (!preIdlePresence_) {
+			/* We didn't go autoaway (the user was already away when the timer ticked */
+			return;
+		}
 		if (client_ && client_->isAvailable()) {
 			sendPresence(preIdlePresence_);
 		} else {
-- 
cgit v0.10.2-6-g49f6