bool _initial = false; // pff state public async Task HandleLogin(AccessInfo info) { var localUserInfo = DomainEvilGlobal.SecretData.UserInfo; if (_initial && info.AccessToken == localUserInfo.AccessToken) return; localUserInfo.AccessToken = info.AccessToken; // TODO: cleanup vs ContactList //await ProcessLogin().ConfigureAwait(false); await DomainEvilGlobal.SecretData.Save().ConfigureAwait(false); Cheat.PublishEvent(new ApiKeyUpdated(localUserInfo.AccessToken)); _initial = true; //await new LoginChanged(localUserInfo).Raise().ConfigureAwait(false); }