changeset 302:6e36b44cbd34

browser_side: bug fix for setting a new presence when the current one is 'unavailable'
author souliane <souliane@mailoo.org>
date Wed, 18 Dec 2013 08:59:44 +0100
parents 5943eaa6f422
children 6ce8515ee8f5
files browser_side/panels.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/panels.py	Wed Dec 18 07:45:53 2013 +0100
+++ b/browser_side/panels.py	Wed Dec 18 08:59:44 2013 +0100
@@ -822,7 +822,7 @@
 
     def setPresence(self, presence):
         status = self.status_panel.status
-        if not status.strip() or status == "&nbsp;" or status == const.PRESENCE[self.presence]:
+        if not status.strip() or status == "&nbsp;" or (self.presence in const.PRESENCE and status == const.PRESENCE[self.presence]):
             self.changeStatus(const.PRESENCE[presence])
         self.presence = presence
         setPresenceStyle(self.presence_button, self.presence)