Beispiel #1
0
        public override async Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress <string> progress)
        {
            bool read;

            if (!SettingManager.Common.UnreadManage)
            {
                read = true;
            }
            else
            {
                read = startup && SettingManager.Common.Read;
            }

            progress.Report(string.Format(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText5, backward ? -1 : 1));

            await tw.GetHomeTimelineApi(read, this, backward, startup)
            .ConfigureAwait(false);

            // 新着時未読クリア
            if (SettingManager.Common.ReadOldPosts)
            {
                TabInformations.GetInstance().SetReadHomeTab();
            }

            TabInformations.GetInstance().DistributePosts();

            progress.Report(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText1);
        }
        public override async Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress <string> progress)
        {
            if (this.ListInfo == null || this.ListInfo.Id == 0)
            {
                return;
            }

            bool read;

            if (!SettingManager.Common.UnreadManage)
            {
                read = true;
            }
            else
            {
                read = startup && SettingManager.Common.Read;
            }

            progress.Report("List refreshing...");

            await tw.GetListStatus(read, this, backward, startup)
            .ConfigureAwait(false);

            TabInformations.GetInstance().DistributePosts();

            progress.Report("List refreshed");
        }
Beispiel #3
0
        public override async Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress <string> progress)
        {
            if (string.IsNullOrEmpty(this.ScreenName))
            {
                return;
            }

            bool read;

            if (!SettingManager.Common.UnreadManage)
            {
                read = true;
            }
            else
            {
                read = startup && SettingManager.Common.Read;
            }

            progress.Report("UserTimeline refreshing...");

            await tw.GetUserTimelineApi(read, this.ScreenName, this, backward)
            .ConfigureAwait(false);

            TabInformations.GetInstance().DistributePosts();

            progress.Report("UserTimeline refreshed");
        }
Beispiel #4
0
        public override async Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress <string> progress)
        {
            bool read;

            if (!SettingManager.Common.UnreadManage)
            {
                read = true;
            }
            else
            {
                read = startup && SettingManager.Common.Read;
            }

            progress.Report(string.Format(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText8, backward ? -1 : 1));

            await tw.GetDirectMessageApi(read, MyCommon.WORKERTYPE.DirectMessegeRcv, backward)
            .ConfigureAwait(false);

            await tw.GetDirectMessageApi(read, MyCommon.WORKERTYPE.DirectMessegeSnt, backward)
            .ConfigureAwait(false);

            TabInformations.GetInstance().DistributePosts();

            progress.Report(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText11);
        }
        public TabInformationTest()
        {
            this.tabinfo = TabInformations._instance = (TabInformations)Activator.CreateInstance(typeof(TabInformations), true) !;

            // 標準のタブを追加
            this.tabinfo.AddTab(new HomeTabModel("Recent"));
            this.tabinfo.AddTab(new MentionsTabModel("Reply"));
            this.tabinfo.AddTab(new DirectMessagesTabModel("DM"));
            this.tabinfo.AddTab(new FavoritesTabModel("Favorites"));
        }
Beispiel #6
0
        public override void AddPostQueue(PostClass post)
        {
            if (TabInformations.GetInstance().IsMuted(post, isHomeTimeline: false))
            {
                return;
            }

            this.internalPosts.TryAdd(post.StatusId, post);

            base.AddPostQueue(post);
        }
Beispiel #7
0
        public TabInformationTest()
        {
            this.tabinfo = Activator.CreateInstance(typeof(TabInformations), true) as TabInformations;

            // TabInformation.GetInstance() で取得できるようにする
            var field = typeof(TabInformations).GetField("_instance",
                                                         BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.SetField);

            field.SetValue(null, this.tabinfo);

            // 標準のタブを追加
            this.tabinfo.AddTab(new HomeTabModel("Recent"));
            this.tabinfo.AddTab(new MentionsTabModel("Reply"));
            this.tabinfo.AddTab(new DirectMessagesTabModel("DM"));
            this.tabinfo.AddTab(new FavoritesTabModel("Favorites"));
        }
        public override async Task RefreshAsync(Twitter tw, bool _, bool startup, IProgress <string> progress)
        {
            bool read;

            if (!SettingManager.Common.UnreadManage)
            {
                read = true;
            }
            else
            {
                read = startup && SettingManager.Common.Read;
            }

            progress.Report("Related refreshing...");

            await tw.GetRelatedResult(read, this)
            .ConfigureAwait(false);

            TabInformations.GetInstance().DistributePosts();

            progress.Report("Related refreshed");
        }
Beispiel #9
0
        public override async Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress <string> progress)
        {
            bool read;

            if (!SettingManager.Common.UnreadManage)
            {
                read = true;
            }
            else
            {
                read = startup && SettingManager.Common.Read;
            }

            progress.Report(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText19);

            await tw.GetFavoritesApi(read, this, backward)
            .ConfigureAwait(false);

            TabInformations.GetInstance().DistributePosts();

            progress.Report(Properties.Resources.GetTimelineWorker_RunWorkerCompletedText20);
        }
Beispiel #10
0
        public override Task RefreshAsync(Twitter tw, bool backward, bool startup, IProgress <string> progress)
        {
            var homeTab = TabInformations.GetInstance().HomeTab;

            return(homeTab.RefreshAsync(tw, backward, startup, progress));
        }