public override async Task InitializeAsync(object navigationData)
        {
            if (IsInitialize == true)
            {
                return;
            }
            model = await articlePresenter.GetClientArticle(Id);            //从本地数据库获取

            IsProgressing |= await RenewDailyUI(model) == false;

            ProgressBarRunning();
            await Task.Run(async() =>
            {
                if (model.Title == "" ||
                    (model.UpdateTime != DateTime.MinValue &&
                     model.UpdateTime.AddMinutes(15) < DateTime.Now))
                {
                    model = await articlePresenter.GetServiceArticle(Id);
                    await RenewDailyUI(model);
                    IsProgressing = false;
                }
            });

            IsInitialize = true;
        }
Пример #2
0
 public async void OnRefresh()
 {
     await articlePresenter.GetServiceArticle(slug);
 }
Пример #3
0
 public async void OnRefresh()
 {
     swipeRefreshLayout.Refreshing = true;
     await articlePresenter.GetServiceArticle(TokenShared.GetAccessToken(this), Id);
 }