mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-22 10:59:30 +00:00
Refactor chapter seeking logic in AudiobookPlayerSeekChapterButton
This commit is contained in:
parent
2f078742d0
commit
b2130a53cc
6 changed files with 27 additions and 88 deletions
|
|
@ -14,7 +14,7 @@ BookExpanded? currentlyPlayingBook(CurrentlyPlayingBookRef ref) {
|
|||
@riverpod
|
||||
BookChapter? currentPlayingChapter(CurrentPlayingChapterRef ref) {
|
||||
final player = ref.watch(audiobookPlayerProvider);
|
||||
player.positionStream.listen((_) {
|
||||
player.slowPositionStream.listen((_) {
|
||||
ref.invalidateSelf();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ final currentlyPlayingBookProvider =
|
|||
|
||||
typedef CurrentlyPlayingBookRef = AutoDisposeProviderRef<BookExpanded?>;
|
||||
String _$currentPlayingChapterHash() =>
|
||||
r'91ca01ee93e0d556c77237ceebb3f9281d2d2b3f';
|
||||
r'a084da724e3d8bb1b1475e867ab3200d7d61d827';
|
||||
|
||||
/// provided the current chapter of the book being played
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue