private async void RequestData() { var entry = await FactionSystem.ClientGetFactionEntry(this.clanTag); if (this.IsDisposed) { // received too late return; } this.factionEntry = entry; this.Refresh(); }
public ViewModelFactionEntry( FactionListEntry entry, bool isLeaderboardEntry, bool isPreviewEntry) { this.IsLeaderboardEntry = isLeaderboardEntry; this.IsPreviewEntry = isPreviewEntry; this.entry = entry; FactionSystem.ClientCurrentSubmittedApplications.CollectionChanged += this.SubmittedApplicationsListChangedHandler; FactionSystem.ClientCurrentReceivedInvitations.CollectionChanged += this.ReceivedInvitationsListChangedHandler; this.RefreshActiveInvitation(); this.RefreshActiveApplication(); // Preload the emblem texture. // Otherwise it will not load until the emblem is requested by UI // which causes a significant delay before the emblem could be rendered. ClientFactionEmblemBrushCache.GetEmblemTextureBrush(this.entry.ClanTag); }