예제 #1
0
        public static async Task <TabHome> Create(long id, int surrogateKey, ITweetsPublisher tweetsPublisher)
        {
            var ret = new TabHome(id, surrogateKey, tweetsPublisher);
            await ret.FetchTweetsAsync();

            var listInfo = await Authorization.GetToken().Lists.ShowAsync(list_id => id, tweet_mode => "extended");

            ret.Name = listInfo.Name;
            return(ret);
        }
예제 #2
0
        protected TabBase(long id, int surrogateKey, ITweetsPublisher tweetsPublisher)
        {
            Disposable = new CompositeDisposable();

            Id              = id;
            SurrogateKey    = surrogateKey;
            TweetsPublisher = tweetsPublisher;

            OnTick = async(s, e) => await FetchTweetsAsync();

            IsOrSearch        = Tweets.IsOrSearch.ToReadOnlyReactivePropertySlim();
            OnCheckFilterLink = new ReactiveCommand()
                                .AddTo(Disposable);
            OnCheckFilterImages = new ReactiveCommand()
                                  .AddTo(Disposable);
            OnCheckFilterVideos = new ReactiveCommand()
                                  .AddTo(Disposable);
            OnCheckFilterRetweeted = new ReactiveCommand()
                                     .AddTo(Disposable);
            OnClickAndSearch = new ReactiveCommand()
                               .AddTo(Disposable);
            SendReply = new ReactiveCommand()
                        .AddTo(Disposable);
            SelectionChange = new ReactiveCommand <SelectionChangedEventArgs>()
                              .AddTo(Disposable);
            SaveImages = new ReactiveCommand <KeyEventArgs>()
                         .AddTo(Disposable);
            SelectionChangeMedia = new ReactiveCommand <SelectionChangedEventArgs>()
                                   .AddTo(Disposable);

            OnCheckFilterLink.Subscribe(async _ => await OnCheckFilterLinkAction())
            .AddTo(Disposable);
            OnCheckFilterImages.Subscribe(async _ => await OnCheckFilterImagesAction())
            .AddTo(Disposable);
            OnCheckFilterVideos.Subscribe(async _ => await OnCheckFilterVideosAction())
            .AddTo(Disposable);
            OnCheckFilterRetweeted.Subscribe(async _ => await OnCheckFilterRetweetedAction())
            .AddTo(Disposable);
            OnClickAndSearch.Subscribe(_ => OnClickAndSearchAction())
            .AddTo(Disposable);
            SendReply.Subscribe(_ => SendReplyAction())
            .AddTo(Disposable);
            SelectionChange.Subscribe(e => SelectionChangeAction(e))
            .AddTo(Disposable);
            // SaveImages.Subscribe(e => SaveImagesAction(e))
            //    .AddTo(Disposable);
        }
예제 #3
0
 private TabHome(long id, int surrogateKey, ITweetsPublisher tweetsPublisher) : base(id, surrogateKey, tweetsPublisher)
 {
 }
예제 #4
0
 public TabFactory(ITweetsPublisher tweetsPublisher)
 {
     TweetsPublisher = tweetsPublisher;
 }