public void Next() { if (IsEnd) { return; } IsActive = true; Task.Run(() => { var videos = User.UserInstance.GetUserVideo(); if (videos == null) { IsEnd = true; IsActive = false; return; } foreach (var video in videos) { UserVideoList.Add(new SearchResultEntryViewModel(video)); } IsActive = false; }); }
public void Initialize() { IsActive = true; Task.Run(() => { var videos = User.UserInstance.GetUserVideo(); if (videos == null) { if (UserVideoList.Count == 0) { //非公開、又は表示期限切れ Closed = true; } IsEnd = true; IsActive = false; return; } foreach (var video in videos) { UserVideoList.Add(new SearchResultEntryViewModel(video)); } IsActive = false; }); }
public async void GetPage() { IsActive = true; UserVideoList.Clear(); var videos = await User.UserInstance.GetUserVideoAsync(CurrentPage); if (videos == null) { if (UserVideoList.Count == 0) { //非公開、又は表示期限切れ Closed = true; } IsActive = false; return; } foreach (var video in videos) { UserVideoList.Add(new SearchResultEntryViewModel(video)); } IsActive = false; }