mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Reset last_pos when moving to next utterance
This commit is contained in:
parent
0b2fe9d569
commit
eb6d2d8636
@ -69,6 +69,9 @@ class Tracker:
|
|||||||
def pop_first(self) -> bool:
|
def pop_first(self) -> bool:
|
||||||
if self.queue:
|
if self.queue:
|
||||||
self.queue.popleft()
|
self.queue.popleft()
|
||||||
|
self.last_pos = 0
|
||||||
|
if self.queue:
|
||||||
|
self.last_pos = self.queue[0].index_in_positions
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -52,6 +52,9 @@ class Tracker:
|
|||||||
|
|
||||||
def pop_first(self):
|
def pop_first(self):
|
||||||
self.queue.splice(0, 1)
|
self.queue.splice(0, 1)
|
||||||
|
self.last_pos = 0
|
||||||
|
if self.queue.length:
|
||||||
|
self.last_pos = self.queue[0].index_in_positions
|
||||||
|
|
||||||
def current_text(self):
|
def current_text(self):
|
||||||
if self.queue.length:
|
if self.queue.length:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user