Esempio n. 1
0
class TrainingsModeSelectorItem(ModeSelectorLegacyItem):
    __slots__ = ('__requester', )

    def _onInitializing(self):
        super(TrainingsModeSelectorItem, self)._onInitializing()
        self.__requester = TrainingListRequester()
        self.__requester.start(self._onListReceived)
        self._onListReceived([])

    def _onDisposing(self):
        self.__requester.stop()

    def _onListReceived(self, prebattles):
        count = sum((1 for _ in prebattles))
        self.viewModel.setStatusActive(
            backport.text(
                R.strings.mode_selector.mode.trainingsList.call.c_1(),
                amount=backport.getIntegralFormat(count)))
Esempio n. 2
0
 def _onInitializing(self):
     super(TrainingsModeSelectorItem, self)._onInitializing()
     self.__requester = TrainingListRequester()
     self.__requester.start(self._onListReceived)
     self._onListReceived([])
 def __init__(self):
     super(TrainingIntroEntity, self).__init__(FUNCTIONAL_FLAG.TRAINING, PREBATTLE_TYPE.TRAINING, TrainingListRequester())