Skip to content

Commit

Permalink
Fixed issues with bookmarks not properly scrolling
Browse files Browse the repository at this point in the history
Previously the cleanup of the UI and bookmark remnants resulted in about
3 calls to the scrollChangedMessage. Now there should only be one (in
  ChangeChapter)
  • Loading branch information
CobaltGoldCS committed May 29, 2024
1 parent bc030bf commit d68c25f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Spindler/ViewModels/ReaderViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ await PopupExtensions.ShowPopupAsync(currentPage, view) is not Bookmark bookmark
// Preloaded Data is no longer valid for the bookmark
ReaderService.InvalidatePreloadedData();

WeakReferenceMessenger.Default.Send(new ChangeScrollMessage((0, false)));
var data = await ReaderService.LoadUrl(bookmark!.Url);
switch (data)
{
Expand All @@ -223,10 +222,8 @@ await PopupExtensions.ShowPopupAsync(currentPage, view) is not Bookmark bookmark

// Cleanup
IsLoading = false;
CurrentBook.Position = bookmark.Position;
ChangeChapter();
if (bookmark.Position > 0)
WeakReferenceMessenger.Default.Send(new ChangeScrollMessage((bookmark.Position, false)));
CurrentBook = await Database.GetItemByIdAsync<Book>(CurrentBook.Id);
}

/// <summary>
Expand Down

0 comments on commit d68c25f

Please sign in to comment.