public LiveCommentSidePaneContentViewModel(HohoemaUserSettings settings, Microsoft.Toolkit.Uwp.UI.AdvancedCollectionView comments)
        {
            UserSettings = settings;
            Comments     = comments;
            IsCommentListScrollWithVideo = new ReactiveProperty <bool>(CurrentWindowContextScheduler, false)
                                           .AddTo(_CompositeDisposable);

            NGUsers = new ReadOnlyObservableCollection <NGUserIdInfo>(UserSettings.NGSettings.NGLiveCommentUserIds);
            IsNGCommentUserIdEnabled = UserSettings.NGSettings.ToReactivePropertyAsSynchronized(x => x.IsNGLiveCommentUserEnable, CurrentWindowContextScheduler)
                                       .AddTo(_CompositeDisposable);
        }
        public LiveCommentSidePaneContentViewModel(
            PlayerSettings playerSettings,
            Microsoft.Toolkit.Uwp.UI.AdvancedCollectionView comments,
            Services.ExternalAccessService externalAccessService,
            IScheduler scheduler
            )
        {
            _playerSettings                   = playerSettings;
            Comments                          = comments;
            ExternalAccessService             = externalAccessService;
            NicoLiveUserIdAddToNGCommand      = new Commands.NicoLiveUserIdAddToNGCommand(_playerSettings);
            NicoLiveUserIdRemoveFromNGCommand = new Commands.NicoLiveUserIdRemoveFromNGCommand(_playerSettings);
            _scheduler                        = scheduler;
            IsCommentListScrollWithVideo      = new ReactiveProperty <bool>(_scheduler, false)
                                                .AddTo(_CompositeDisposable);

            NGUsers = new ReadOnlyObservableCollection <LiveNGUserInfo>(_playerSettings.NGLiveCommentUserIds);
            IsNGCommentUserIdEnabled = _playerSettings.ToReactivePropertyAsSynchronized(x => x.IsNGLiveCommentUserEnable, _scheduler)
                                       .AddTo(_CompositeDisposable);
        }
Beispiel #3
0
        public LiveCommentSidePaneContentViewModel(
            NGSettings settings,
            Microsoft.Toolkit.Uwp.UI.AdvancedCollectionView comments,
            Services.ExternalAccessService externalAccessService,
            Commands.NicoLiveUserIdAddToNGCommand nicoLiveUserIdAddToNGCommand,
            Commands.NicoLiveUserIdRemoveFromNGCommand nicoLiveUserIdRemoveFromNGCommand
            )
        {
            NGSettings                        = settings;
            Comments                          = comments;
            ExternalAccessService             = externalAccessService;
            NicoLiveUserIdAddToNGCommand      = nicoLiveUserIdAddToNGCommand;
            NicoLiveUserIdRemoveFromNGCommand = nicoLiveUserIdRemoveFromNGCommand;
            IsCommentListScrollWithVideo      = new ReactiveProperty <bool>(CurrentWindowContextScheduler, false)
                                                .AddTo(_CompositeDisposable);

            NGUsers = new ReadOnlyObservableCollection <NGUserIdInfo>(NGSettings.NGLiveCommentUserIds);
            IsNGCommentUserIdEnabled = NGSettings.ToReactivePropertyAsSynchronized(x => x.IsNGLiveCommentUserEnable, CurrentWindowContextScheduler)
                                       .AddTo(_CompositeDisposable);
        }