iOS: replace shuffle/repeat with time skip and add chapter navigation to full player
Some checks failed
CI / Scraper / Test (pull_request) Failing after 8s
CI / UI / Build (pull_request) Failing after 8s
CI / Scraper / Lint (pull_request) Failing after 11s
CI / Scraper / Build (pull_request) Has been skipped
iOS CI / Build (push) Has been cancelled
iOS CI / Test (push) Has been cancelled
iOS CI / Build (pull_request) Failing after 1s
iOS CI / Test (pull_request) Has been skipped
Some checks failed
CI / Scraper / Test (pull_request) Failing after 8s
CI / UI / Build (pull_request) Failing after 8s
CI / Scraper / Lint (pull_request) Failing after 11s
CI / Scraper / Build (pull_request) Has been skipped
iOS CI / Build (push) Has been cancelled
iOS CI / Test (push) Has been cancelled
iOS CI / Build (pull_request) Failing after 1s
iOS CI / Test (pull_request) Has been skipped
- Leftmost button: 15-second backward skip (gobackward.15) - Second button: previous chapter navigation (backward.end.fill) - Center: play/pause (unchanged) - Fourth button: next chapter navigation (forward.end.fill) - Rightmost button: 15-second forward skip (goforward.15) - Added prevChapter tracking in AudioPlayerService - Added skipToPrevChapter notification support - Chapter nav buttons disabled when no prev/next available (0.5 opacity) - Updated load() signature to accept prevChapter parameter - Auto-next properly tracks prevChapter when advancing chapters
This commit is contained in:
@@ -61,6 +61,14 @@ struct ChapterReaderView: View {
|
||||
vm.navigateTo = next
|
||||
}
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: .skipToNextChapter)) { note in
|
||||
guard let next = note.userInfo?["next"] as? Int else { return }
|
||||
vm.navigateTo = next
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: .skipToPrevChapter)) { note in
|
||||
guard let prev = note.userInfo?["prev"] as? Int else { return }
|
||||
vm.navigateTo = prev
|
||||
}
|
||||
.navigationDestination(isPresented: Binding(
|
||||
get: { vm.navigateTo != nil },
|
||||
set: { if !$0 { vm.navigateTo = nil } }
|
||||
|
||||
Reference in New Issue
Block a user