From 08c06a6dff2deb3106509c73d578117ef4d1eff2 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Tue, 11 Oct 2022 15:12:22 +0800 Subject: [PATCH] Add a button to reset read location This will be more useful when text to speech updates read position while listening, gives the user more control and makes it easier to handle scrolling back in an article. --- .../Sources/App/Views/WebReader/WebReaderContainer.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift index 31f50f7a8..f40ca22d5 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift @@ -175,6 +175,12 @@ struct WebReaderContainerView: View { ) } ) + Button( + action: { + dataService.updateLinkReadingProgress(itemID: item.unwrappedID, readingProgress: 0, anchorIndex: 0) + }, + label: { Label("Reset Read Location", systemImage: "arrow.counterclockwise.circle") } + ) Button( action: { shareActionID = UUID() }, label: { Label("Share Original", systemImage: "square.and.arrow.up") }