Skip to content

Commit

Permalink
修复生涯界面 tagLine 数据没有随客户端改变更新而更新的问题 (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Apr 21, 2024
1 parent 2cfd463 commit fbce8ba
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/view/career_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,11 @@ async def updateInterface(self, puuid=None, summoner=None):

if summoner is None:
summoner = await connector.getSummonerByPuuid(puuid)
self.loadGamesTask = asyncio.create_task(connector.getSummonerGamesByPuuid(summoner['puuid'], 0, cfg.get(cfg.careerGamesNumber) - 1))
rankTask = asyncio.create_task(connector.getRankedStatsByPuuid(summoner['puuid']))

self.loadGamesTask = asyncio.create_task(
connector.getSummonerGamesByPuuid(summoner['puuid'], 0, cfg.get(cfg.careerGamesNumber) - 1))
rankTask = asyncio.create_task(
connector.getRankedStatsByPuuid(summoner['puuid']))

info = await parseSummonerData(summoner, rankTask, self.loadGamesTask)
await self.repaintInterface(info)
Expand All @@ -389,6 +392,9 @@ async def repaintInterface(self, info):
if len(info['tagLine']):
self.showTagLine = True
self.tagLineLabel.setText(f"# {info['tagLine']}")
else:
self.showTagLine = False
self.tagLineLabel.setText("")

levelStr = str(level) if level != -1 else "None"
self.icon.updateIcon(icon, xpSinceLastLevel,
Expand Down

0 comments on commit fbce8ba

Please sign in to comment.