Fixing a bug where the UI was not updated on logout
authorEd Page <eopage@byu.net>
Thu, 31 Mar 2011 01:50:41 +0000 (20:50 -0500)
committerEd Page <eopage@byu.net>
Thu, 31 Mar 2011 01:50:41 +0000 (20:50 -0500)
src/session.py

index 7697bf1..097c9dd 100644 (file)
@@ -270,6 +270,7 @@ class Session(QtCore.QObject):
                self._loggedInTime = self._LOGGEDOUT_TIME
                self._backend[0].persist()
                self._save_to_cache()
+               self.stateChange.emit(self.LOGGEDOUT_STATE)
 
        def clear(self):
                assert self.state == self.LOGGEDOUT_STATE, "Can only clear when logged out (currently %s" % self.state
@@ -283,6 +284,7 @@ class Session(QtCore.QObject):
                self._pool.stop()
                self._loggedInTime = self._LOGGEDOUT_TIME
                self.clear()
+               self.stateChange.emit(self.LOGGEDOUT_STATE)
 
        def update_contacts(self, force = True):
                if not force and self._contacts: