def setAccount(self, account): self.__account = account if self.__syncController is not None: self.__syncController.destroy() self.__syncController = None if account is not None: self.__syncController = SyncController(account, self.__sendSyncRequest, self.__onSyncResponse, self.__onSyncComplete) return
def setAccount(self, account): self.__account = account self.__persistentCache.setAccount(account) if self.__syncController is not None: self.__syncController.destroy() self.__syncController = None if account is not None: self.__syncController = SyncController(account, self.__sendSyncRequest, self.__onSyncResponse, self.__onSyncComplete)
def setAccount(self, account): self.__account = account if self.__syncController is not None: self.__syncController.destroy() self.__syncController = None self.__savePersistentCache() if account is not None: self.__persistentCache.setAccount(account) self.__syncController = SyncController(account, self.__sendSyncRequest, self.__onSyncResponse, self.__onSyncComplete) else: self.__notifySubscribers(AccountCommands.RES_NON_PLAYER) return
def setAccount(self, account): self.__account = account if self.__syncController is not None: self.__syncController.destroy() self.__syncController = None self.__savePersistentCache() if account is not None: oldName = self.__persistentCache.getAccountName() assert oldName is None or oldName == account.name self.__persistentCache.setAccountName(account.name) self.__syncController = SyncController(account, self.__sendSyncRequest, self.__onSyncResponse, self.__onSyncComplete)