v1.0.45-oss (#221)
* Implemented ML-based comic panel detection and a panel popup viewer. * Optimized `ComicPanelDetector` for performance and memory efficiency. * Optimized comic panel detection performance by introducing a dedicated single-thread dispatcher for ML tasks, replacing mutex-based synchronization. * Refactored system UI handling and layout padding in `PdfViewerScreen`. * Refactor `PdfViewerScreen.kt` by extracting components and logic into specialized files. * replace hardcoded padding with dynamic header height and adjust IME layout logic * Improve `PdfTextBox` interaction and visual consistency during zoom and pan. * improve PDF text box dragging and scaling behavior across zoom levels * optimize color scheme calculation using remember and expand text dimming coverage * Implement in-app language selection and per-app language preferences. * Improve PDF lock stability in `PdfVerticalReader` * Implement "Preserve Image Colors" option for PDF themes * Optimize TOC locate in ReaderDrawer * Update library and home screen UI components * smoother page turn animation in epub pagination mode * Implement automatic page skipping for TTS when no text is found in PDF viewer * Refine status bar handling and window insets across main screens * Optimize ViewModel initialization and integrate AndroidX SplashScreen * Move ComicPanelDetector to debug source set and introduce IPanelDetector interface * Optimize TOC scrolling in PdfNavigationDrawerContent * Bump version to 1.0.45(45)
This commit is contained in:
parent
71e3614ad6
commit
cb7de86224
33 changed files with 4795 additions and 3447 deletions
|
|
@ -1908,7 +1908,6 @@ internal fun PaginatedReaderContent(
|
|||
val down = event.changes.firstOrNull { it.pressed }
|
||||
if (down != null) {
|
||||
pageTurnTouchY = down.position.y
|
||||
Timber.tag("PageTurnFixDiag").v("Touch Event: Y=${down.position.y} at OffsetFraction=${pagerState.currentPageOffsetFraction}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3952,10 +3951,6 @@ private fun Modifier.realisticBookPage(
|
|||
isDarkTheme: Boolean,
|
||||
touchY: Float?
|
||||
): Modifier = composed {
|
||||
// Log composition frequency
|
||||
SideEffect {
|
||||
Timber.tag("PageTurnFixDiag").v("Page $pageIndex re-composed. Offset: ${pagerState.currentPageOffsetFraction}")
|
||||
}
|
||||
|
||||
val frontPath = remember { Path() }
|
||||
val backPath = remember { Path() }
|
||||
|
|
@ -3965,7 +3960,6 @@ private fun Modifier.realisticBookPage(
|
|||
.graphicsLayer {
|
||||
val pageOffset = (pageIndex - pagerState.currentPage) - pagerState.currentPageOffsetFraction
|
||||
|
||||
// Log layer property updates
|
||||
if (abs(pageOffset) > 0.001f && abs(pageOffset) < 0.999f) {
|
||||
Timber.tag("PageTurnFixDiag").d("graphicsLayer: Page $pageIndex, Offset: $pageOffset")
|
||||
}
|
||||
|
|
@ -3994,7 +3988,14 @@ private fun Modifier.realisticBookPage(
|
|||
val h = size.height
|
||||
|
||||
val startY = touchY ?: h
|
||||
val centerDist = ((startY - h / 2f) / (h / 2f)).coerceIn(-1f, 1f)
|
||||
val rawCenterDist = ((startY - h / 2f) / (h / 2f)).coerceIn(-1f, 1f)
|
||||
|
||||
val flattenFactor = if (progress > 0.75f) {
|
||||
((progress - 0.75f) / 0.25f).coerceIn(0f, 1f)
|
||||
} else {
|
||||
0f
|
||||
}
|
||||
val centerDist = rawCenterDist * (1f - flattenFactor)
|
||||
|
||||
val cornerY = if (centerDist >= 0) h else 0f
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue