Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aec03c6c71 | |||
| c9c119689d |
@@ -306,7 +306,10 @@ class ReaderActivity : BaseActivity() {
|
|||||||
|
|
||||||
AppBars(state = state)
|
AppBars(state = state)
|
||||||
|
|
||||||
if (ttsState.active) {
|
val showFloatingTts = ttsState.active &&
|
||||||
|
ttsState.readerChapterId == state.currentChapter?.chapter?.id &&
|
||||||
|
state.currentChapter?.pages?.any { it is TextReaderPage } == true
|
||||||
|
if (showFloatingTts) {
|
||||||
IconButton(
|
IconButton(
|
||||||
onClick = ::toggleTts,
|
onClick = ::toggleTts,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -842,10 +845,13 @@ class ReaderActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ttsHighlightedPage = targetPage
|
ttsHighlightedPage = targetPage
|
||||||
if (state.currentPage != targetPage.index + 1) {
|
val targetPageIsVisible = state.currentPage == targetPage.index + 1
|
||||||
|
if (ttsState.playing && !targetPageIsVisible) {
|
||||||
moveToPageIndex(targetPage.index)
|
moveToPageIndex(targetPage.index)
|
||||||
}
|
}
|
||||||
state.viewer?.refreshCurrentPage()
|
if (ttsState.playing || targetPageIsVisible) {
|
||||||
|
state.viewer?.refreshCurrentPage()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user