예제 #1
0
        private async Task UpdateIsSignedIn()
        {
            _presenceViewModel.IsSignedIn = await _microsoftAuthentication.IsSignedInAsync();

            if (_presenceViewModel.IsSignedIn)
            {
                _timer.Start();

                _presenceViewModel.UserName = await _microsoftAuthentication.GetUserNameAsync();

                _presenceViewModel.ProfileImage = await _presenceService.GetPhotoAsync();
            }
            else
            {
                _timer.Stop();
                _presenceViewModel.ProfileImage = _presenceService.GetDefaultPhoto();
            }
        }