def exitFromLazyChannels(self): channels = self.channelsStorage.getChannelsByCriteria( find_criteria.BWLazyChannelFindCriteria(LAZY_CHANNEL.ALL)) for channel in channels: if channel.isJoined(): LOG_DEBUG('Send request to exit from lazy channel', i18n.encodeUtf8(channel.getName())) self.exitFromChannel(channel.getID())
def _onRegisterFlashComponent(self, viewPy, alias): if alias == MESSENGER_VIEW_ALIAS.CHANNEL_COMPONENT: channels = MessengerEntry.g_instance.gui.channelsCtrl controller = None if channels: controller = channels.getControllerByCriteria(find_criteria.BWLazyChannelFindCriteria(self._name)) if controller is not None: controller.setView(viewPy) else: self.addListener(events.MessengerEvent.LAZY_CHANNEL_CTRL_INITED, self.__handleLazyChannelControllerInited, scope=EVENT_BUS_SCOPE.LOBBY) return