private void RaiseAccountDataUpdated(IEnumerable <long> targetUsers, bool isAdded) { var rdci = new RelationDataChangedInfo { AccountUserId = _parent.AccountId, IsIdAdded = isAdded, TargetUserIds = targetUsers, Type = _type }; AccountDataUpdated.SafeInvoke(rdci); }
public static async Task <bool> UpdateAccountData() { Log.Info("Updating account data..."); try { if (!await UpdateToken()) { Log.Error("Could not update token data"); return(false); } var account = await Client.Value.GetHSReplayNetAccount(); Data.Value.Account = account; Save(); Log.Info($"Found account: {account?.Username ?? "None"}"); AccountDataUpdated?.Invoke(); return(account != null); } catch (Exception e) { Log.Error(e); return(false); } }
private void PropagateEvent(RelationDataChangedInfo e) { AccountDataUpdated.SafeInvoke(e); AccountDataUpdatedStatic.SafeInvoke(e); }