Пример #1
0
 async Task ProfileData(ProfileDataResultEvent arg)
 {
     if (_subscriptions.UpdateProfile(arg.AccountId, arg.ProfileData.ProfileInfo))
     {
         await SaveAsync();
     }
 }
Пример #2
0
        Task ProfileData(ProfileDataResultEvent arg)
        {
            if (arg.AccountId == _accountId && _profileType == StatusAccountProfileType.Big)
            {
                var profileData = arg.ProfileData;
                if (profileData.ProfileInfoResult == ProfileDownloadResult.Available)
                {
                    if (ProfilePageSections.HasProfileSections(this))
                    {
                        if (ProfilePageSections.UpdateProfileSections(this, arg.ProfileData))
                        {
                            UpdateSuspendedLayout();
                        }
                    }
                    else
                    {
                        AddIndex = GetRow("Title");
                        ProfilePageSections.AddProfileSections(this, arg.ProfileData, "Profile", _profileType == StatusAccountProfileType.Big);
                        UpdateSuspendedLayout();
                    }
                }
            }

            return(Task.CompletedTask);
        }
Пример #3
0
        async Task UpdateProfileData(ProfileDataResultEvent arg)
        {
            foreach (var row in _updates)
            {
                var info = row.Tag as SubscriptionInfo;
                if (info.AccountId == arg.AccountId)
                {
                    var profileData = await ProfileManager.Current.GetProfileData(info.AccountId, ProfileDownloadType.DownloadIfNotAvailable, false);

                    ProfilePageSections.UpdateProfileRow(row, info.AccountId, profileData, info.Profile);
                    row.Tag = info;

                    break;
                }
            }
        }
Пример #4
0
        Task ProfileAvailable(ProfileDataResultEvent profileEvent)
        {
            if (profileEvent.AccountId == WalletApp.CurrentAccountId)
            {
                switch (profileEvent.ProfileData.ProfileJsonResult)
                {
                case ProfileDownloadResult.Available:
                    ProfilePageSections.UpdateProfileSections(this, profileEvent.ProfileData);
                    UpdateSuspendedLayout();
                    _hasDownloaded = true;
                    break;

                case ProfileDownloadResult.NotAvailable:
                    _hasDownloaded = true;
                    break;

                case ProfileDownloadResult.NetworkError:
                    break;
                }
            }

            return(Task.CompletedTask);
        }