private void GotSummoner(SummonerCache.Item item) { Cache = item; if (Status?.GameStatus == ChatStatus.inGame) { CurrentGameFetcher.FetchGame(Cache.Data.Summoner.SummonerId, GotGameInfo); } }
public void UpdatePresence(Presence p) { IsOffline = p.Status == null; if (!IsOffline) { Status = new LeagueStatus(p.Status, p.Show); if (Status.GameStatus == ChatStatus.inGame) { RiotServices.GameService.RetrieveInProgressSpectatorGameInfo(User.Name).ContinueWith(GotGameDTO); if (Cache != null) { CurrentGameFetcher.FetchGame(Cache.Data.Summoner.SummonerId, GotGameInfo); } } else { CurrentGameDTO = null; CurrentGameInfo = null; } Session.Current.SummonerCache.GetData(User.Name, GotSummoner); Session.Current.ChatManager.ForceUpdate(); } }