From 215528192a38fd148b546d29eead31a93ce66d3a Mon Sep 17 00:00:00 2001 From: Tsanie Lily Date: Sun, 24 May 2020 13:06:47 +0800 Subject: [PATCH] fix: page indicator return to 1 when refreshing --- Pixiview/Illust/ViewIllustPage.xaml.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Pixiview/Illust/ViewIllustPage.xaml.cs b/Pixiview/Illust/ViewIllustPage.xaml.cs index 5f4d25f..c6f45ee 100644 --- a/Pixiview/Illust/ViewIllustPage.xaml.cs +++ b/Pixiview/Illust/ViewIllustPage.xaml.cs @@ -640,7 +640,7 @@ namespace Pixiview.Illust { IsPageVisible = true; ProgressVisible = true; - PagePositionText = $"1/{count}"; + PagePositionText = $"{CurrentPage + 1}/{count}"; } } @@ -648,6 +648,15 @@ namespace Pixiview.Illust { isPreloading = true; var illustItem = IllustItem; + if (force) + { + var illusts = Illusts; + var currentPage = CurrentPage; + if (currentPage >= 0 && illusts != null && currentPage < illusts.Length) + { + illusts[currentPage].Loading = true; + } + } // force to reload var preload = Stores.LoadIllustPreloadData(illustItem.Id, true, force: force); if (preload != null && preload.illust.TryGetValue(illustItem.Id, out var illust))