def __onBSListReceived(self, sessions): result = [] for bs in sessions: result.append({'prbID': bs.prbID, 'prbType': bs.prbType, 'descr': formatters.getPrebattleFullDescription(bs.description), 'opponents': formatters.getPrebattleOpponentsString(bs.description), 'startTime': formatters.getBattleSessionStartTimeString(bs.startTime)}) self.as_refreshListS(result)
def __onBSListReceived(self, sessions): result = [] clanDBID = self.__webCtrl.getClanDbID() for bs in sessions: detachment, vehicleLvl, _ = formatters.getBattleSessionDetachment(bs.description, clanDBID) if bs.prbType == PREBATTLE_TYPE.CLAN: startTime = self.__getClanBattleStartTime(bs) else: startTime = formatters.getBattleSessionStartTimeString(bs.startTime) result.append({'prbID': bs.prbID, 'prbType': bs.prbType, 'descr': formatters.getPrebattleFullDescription(bs.description), 'opponents': formatters.getPrebattleOpponentsString(bs.description), 'startTime': startTime, 'unitName': detachment, 'vehicleLevel': vehicleLvl}) self.as_refreshListS(result)