From 9873dc2b6bfab264177b8b96eac383df76ea2e0b Mon Sep 17 00:00:00 2001 From: Tsanie Lily <tsorgy@gmail.com> Date: Sun, 17 May 2020 11:35:25 +0800 Subject: [PATCH] fix: do not auto reload data in user/related --- Pixiview/Illust/IllustCollectionPage.cs | 3 ++- Pixiview/Illust/RelatedIllustsPage.xaml.cs | 1 + Pixiview/Illust/UserIllustPage.xaml.cs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Pixiview/Illust/IllustCollectionPage.cs b/Pixiview/Illust/IllustCollectionPage.cs index f1fd1ea..f90ef0a 100644 --- a/Pixiview/Illust/IllustCollectionPage.cs +++ b/Pixiview/Illust/IllustCollectionPage.cs @@ -65,6 +65,7 @@ namespace Pixiview.Illust public IllustCollection IllustCollection { get; set; } protected virtual bool IsFavoriteVisible => true; + protected virtual bool IsAutoReload => true; protected virtual ActivityIndicator LoadingIndicator => null; protected virtual bool IsDelayLoading => false; protected virtual double IndicatorMarginTop => 16; @@ -103,7 +104,7 @@ namespace Pixiview.Illust { base.OnAppearing(); - if (lastUpdated != LastUpdated) + if (lastUpdated == default || (IsAutoReload && lastUpdated != LastUpdated)) { StartLoad(); } diff --git a/Pixiview/Illust/RelatedIllustsPage.xaml.cs b/Pixiview/Illust/RelatedIllustsPage.xaml.cs index 0faf4a2..b34ce2e 100644 --- a/Pixiview/Illust/RelatedIllustsPage.xaml.cs +++ b/Pixiview/Illust/RelatedIllustsPage.xaml.cs @@ -27,6 +27,7 @@ namespace Pixiview.Illust nextIndex = 0; } + protected override bool IsAutoReload => false; protected override ActivityIndicator LoadingIndicator => activityLoading; protected override IEnumerable<IllustItem> DoGetIllustList(IllustRecommendsData data) diff --git a/Pixiview/Illust/UserIllustPage.xaml.cs b/Pixiview/Illust/UserIllustPage.xaml.cs index 486830c..888e7b0 100644 --- a/Pixiview/Illust/UserIllustPage.xaml.cs +++ b/Pixiview/Illust/UserIllustPage.xaml.cs @@ -38,6 +38,7 @@ namespace Pixiview.Illust nextIndex = 0; } + protected override bool IsAutoReload => false; protected override ActivityIndicator LoadingIndicator => activityLoading; protected override IEnumerable<IllustItem> DoGetIllustList(IllustUserData data)