public NicoRepoPageViewModel(

            Services.HohoemaPlaylist hohoemaPlaylist,
            Services.PageManager pageManager,
            ActivityFeedSettings activityFeedSettings,
            Models.Provider.LoginUserNicoRepoProvider loginUserNicoRepoProvider,
            Models.Subscription.SubscriptionManager subscriptionManager
            )
            : base(pageManager, useDefaultPageTitle: true)
        {
            HohoemaPlaylist           = hohoemaPlaylist;
            ActivityFeedSettings      = activityFeedSettings;
            LoginUserNicoRepoProvider = loginUserNicoRepoProvider;
            SubscriptionManager       = subscriptionManager;
            DisplayNicoRepoItemTopics = ActivityFeedSettings.DisplayNicoRepoItemTopics.ToList();

            /*
             * DisplayNicoRepoItemTopics.CollectionChangedAsObservable()
             *  .Throttle(TimeSpan.FromSeconds(1))
             *  .Subscribe(async _ =>
             *  {
             *      await HohoemaApp.UIDispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async () =>
             *      {
             *          await ResetList();
             *      });
             *  });
             */
        }
Esempio n. 2
0
        public NicoRepoPageViewModel(
            IScheduler scheduler,
            ApplicationLayoutManager applicationLayoutManager,
            HohoemaPlaylist hohoemaPlaylist,
            Services.PageManager pageManager,
            ActivityFeedSettings activityFeedSettings,
            Models.Provider.LoginUserNicoRepoProvider loginUserNicoRepoProvider,
            Models.Subscription.SubscriptionManager subscriptionManager,
            OpenLiveContentCommand openLiveContentCommand
            )
        {
            _scheduler = scheduler;
            ApplicationLayoutManager  = applicationLayoutManager;
            HohoemaPlaylist           = hohoemaPlaylist;
            ActivityFeedSettings      = activityFeedSettings;
            LoginUserNicoRepoProvider = loginUserNicoRepoProvider;
            SubscriptionManager       = subscriptionManager;
            _openLiveContentCommand   = openLiveContentCommand;
            DisplayNicoRepoItemTopics = new ObservableCollection <NicoRepoItemTopic>(ActivityFeedSettings.DisplayNicoRepoItemTopics);

            DisplayNicoRepoItemTopics.CollectionChangedAsObservable()
            .Subscribe(_ =>
            {
                _NicoRepoItemTopicsChanged = true;
            })
            .AddTo(_CompositeDisposable);
        }
 public LoginUserNicoRepoTimelineSource(
     Models.Provider.LoginUserNicoRepoProvider loginUserNicoRepoProvider,
     Models.Subscription.SubscriptionManager subscriptionManager,
     IEnumerable <NicoRepoItemTopic> allowedNicoRepoTypes
     )
 {
     AllowedNicoRepoItemType   = allowedNicoRepoTypes.ToList();
     LoginUserNicoRepoProvider = loginUserNicoRepoProvider;
     SubscriptionManager       = subscriptionManager;
 }