def __getCountersList(self):
        counters = []
        for buttonName in self._buttonsWithCounter:
            if isHofButtonNew(buttonName):
                counters.append({'componentId': buttonName, 'count': '1'})

        return counters
Ejemplo n.º 2
0
 def _setRatingButton(self):
     if self._battlesType == PROFILE_DROPDOWN_KEYS.ALL and self.lobbyContext.getServerSettings().isHofEnabled():
         self.as_setRatingButtonS({'enabled': True,
          'visible': True})
         if isHofButtonNew(PROFILE_CONSTANTS.HOF_VIEW_RATING_BUTTON):
             self.as_setBtnCountersS([{'componentId': PROFILE_CONSTANTS.HOF_VIEW_RATING_BUTTON,
               'count': '1'}])
         else:
             self.as_setBtnCountersS([])
     else:
         self.as_setRatingButtonS({'enabled': False,
          'visible': False})
Ejemplo n.º 3
0
 def __updateTabCounters(self):
     if self.__isHofEnabled:
         counters = []
         hofCounter = getHofTabCounter()
         if hofCounter:
             counters.append({
                 'componentId': VIEW_ALIAS.PROFILE_HOF,
                 'count': str(hofCounter)
             })
         if isHofButtonNew(PROFILE_CONSTANTS.HOF_VIEW_RATING_BUTTON):
             counters.append({
                 'componentId': VIEW_ALIAS.PROFILE_TECHNIQUE_PAGE,
                 'count': '1'
             })
         self.__tabNavigator.as_setBtnTabCountersS(counters)
     else:
         self.__tabNavigator.as_setBtnTabCountersS([])