fix: page indicator return to 1 when refreshing

This commit is contained in:
Tsanie Lily 2020-05-24 13:06:47 +08:00
parent 4da7f4d101
commit 215528192a

View File

@ -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))