public NicoFavoriteViewModel()
        {
            AddLoadTask(() =>
            {
                Mylists = NicoUtil.Favorites.ToSyncedSynchronizationContextCollection(
                    x => new NicoMylistViewModel(x.MylistId),
                    System.Threading.SynchronizationContext.Current
                    );
            });

            Disposed += (sender, e) =>
            {
                Mylists.ForEach(x => x.Dispose());
                Mylists.ClearOnUI();
            };
        }
Пример #2
0
        public async Task <SearchVideoByMylistModel> GetMylist(string id)
        {
            var mylist = Mylists.FirstOrDefault(v => v.MylistId == id);

            if (mylist == null)
            {
                mylist = new SearchVideoByMylistModel(id)
                {
                    MylistId = id
                };
                await mylist.Reload();

                Mylists.Add(mylist);
            }

            return(mylist);
        }
Пример #3
0
 public LoginUserMylistPlaylist GetMylistGroup(string groupId)
 {
     return(Mylists.SingleOrDefault(x => x.Id == groupId));
 }
Пример #4
0
 public bool HasMylistGroup(string groupId)
 {
     return(Mylists.Any(x => x.Id == groupId));
 }
Пример #5
0
 public bool CheckIsRegistratedAnyMylist(string videoId)
 {
     return(Mylists.Any(x => x.ContainsVideoId(videoId)));
 }
Пример #6
0
 public UserOwnedMylist GetMylistGroup(string groupId)
 {
     return(Mylists.SingleOrDefault(x => x.GroupId == groupId));
 }