28 lines
841 B
C#
28 lines
841 B
C#
namespace NexusReader.UI.Shared.Services;
|
|
|
|
public interface IReaderNavigationService
|
|
{
|
|
Guid CurrentEbookId { get; }
|
|
int CurrentChapterIndex { get; }
|
|
int TotalChapters { get; }
|
|
string ChapterTitle { get; }
|
|
string? PendingScrollBlockId { get; set; }
|
|
|
|
event Func<Task>? OnNavigationChanged;
|
|
|
|
Task GoToChapter(int index);
|
|
Task GoToNextChapter();
|
|
Task GoToPreviousChapter();
|
|
Task UpdateMetadataAsync(int currentIndex, int totalChapters, string title);
|
|
|
|
/// <summary>
|
|
/// Navigates to the reader for a specific book and records the current ebook ID.
|
|
/// </summary>
|
|
void NavigateToBook(Guid bookId);
|
|
|
|
/// <summary>
|
|
/// Sets the active book context (ID and optional chapter) without triggering browser routing.
|
|
/// </summary>
|
|
void SetBook(Guid bookId, int chapterIndex = 0);
|
|
}
|