コード例 #1
0
        private async Task LoadProfileInfo()
        {
            _messenger.Send(true, $"{MessageType.SHOW_CONTENT_FRAME_PROGRESS_RING}");
            var currentUser = await _dataService.UserService.GetCurrentActiveUserAsync();

            if (currentUser.Succeed)
            {
                CurrentUserName = currentUser.Result.Fullname;
                string userInitials = string.Empty;
                currentUser.Result.Fullname?.Split(" ").ForEach(part =>
                {
                    if (!string.IsNullOrEmpty(part))
                    {
                        userInitials += part.Substring(0, 1);
                    }
                });
                CurrentUserInitials         = userInitials;
                CurrentUserProfileImagePath = MiscellaneousUtils.GetUserProfileImagePath(currentUser.Result.GoogleUserID);
            }

            _messenger.Send(false, $"{MessageType.SHOW_CONTENT_FRAME_PROGRESS_RING}");
        }