fix: do not auto reload data in user/related

This commit is contained in:
Tsanie Lily 2020-05-17 11:35:25 +08:00
parent 03b83b16c4
commit 9873dc2b6b
3 changed files with 4 additions and 1 deletions

View File

@ -65,6 +65,7 @@ namespace Pixiview.Illust
public IllustCollection IllustCollection { get; set; } public IllustCollection IllustCollection { get; set; }
protected virtual bool IsFavoriteVisible => true; protected virtual bool IsFavoriteVisible => true;
protected virtual bool IsAutoReload => true;
protected virtual ActivityIndicator LoadingIndicator => null; protected virtual ActivityIndicator LoadingIndicator => null;
protected virtual bool IsDelayLoading => false; protected virtual bool IsDelayLoading => false;
protected virtual double IndicatorMarginTop => 16; protected virtual double IndicatorMarginTop => 16;
@ -103,7 +104,7 @@ namespace Pixiview.Illust
{ {
base.OnAppearing(); base.OnAppearing();
if (lastUpdated != LastUpdated) if (lastUpdated == default || (IsAutoReload && lastUpdated != LastUpdated))
{ {
StartLoad(); StartLoad();
} }

View File

@ -27,6 +27,7 @@ namespace Pixiview.Illust
nextIndex = 0; nextIndex = 0;
} }
protected override bool IsAutoReload => false;
protected override ActivityIndicator LoadingIndicator => activityLoading; protected override ActivityIndicator LoadingIndicator => activityLoading;
protected override IEnumerable<IllustItem> DoGetIllustList(IllustRecommendsData data) protected override IEnumerable<IllustItem> DoGetIllustList(IllustRecommendsData data)

View File

@ -38,6 +38,7 @@ namespace Pixiview.Illust
nextIndex = 0; nextIndex = 0;
} }
protected override bool IsAutoReload => false;
protected override ActivityIndicator LoadingIndicator => activityLoading; protected override ActivityIndicator LoadingIndicator => activityLoading;
protected override IEnumerable<IllustItem> DoGetIllustList(IllustUserData data) protected override IEnumerable<IllustItem> DoGetIllustList(IllustUserData data)