General improvements (#149)
* Improved eraser hit detection and added horizontal scrolling to AnnotationDock * fix: lock scroll tracking during PDF rotation to prevent page jumping in vertical mode * Implemented a multi-tab reading system for the PDF viewer. * Redesigned the About dialog on homescreen. * improved bulk file import support * Implemented document caching and improved tab restoration in the PDF viewer. * Implemented native link detection and information extraction in `pdfium_bridge.cpp` and integrated it into `PdfPageComposable.kt`. This includes adding `getLinkInfoAtPoint` to `NativePdfiumBridge` to handle URI, GoTo, and RemoteGoTo/Launch actions, and updating the tap gesture logic to prioritize native link handling. * Fixed index bounds and layout padding calculation in PdfViewerScreen
This commit is contained in:
parent
381193d774
commit
c8f361376f
10 changed files with 1236 additions and 601 deletions
|
|
@ -221,9 +221,7 @@ fun HomeScreen(
|
|||
if (isContextualModeActive) {
|
||||
viewModel.clearContextualAction()
|
||||
}
|
||||
uris.forEach { uri ->
|
||||
viewModel.onFileSelected(uri, isFromRecent = false)
|
||||
}
|
||||
viewModel.onFilesSelected(uris)
|
||||
}
|
||||
|
||||
val fallbackFilePickerLauncher = rememberLauncherForActivityResult(
|
||||
|
|
@ -232,9 +230,7 @@ fun HomeScreen(
|
|||
if (isContextualModeActive) {
|
||||
viewModel.clearContextualAction()
|
||||
}
|
||||
uris.forEach { uri ->
|
||||
viewModel.onFileSelected(uri, isFromRecent = false)
|
||||
}
|
||||
viewModel.onFilesSelected(uris)
|
||||
}
|
||||
|
||||
val onSelectFileClick = {
|
||||
|
|
@ -311,7 +307,8 @@ fun HomeScreen(
|
|||
onShowDeviceManagement = viewModel::showDeviceManagementForDebug,
|
||||
onFolderSyncToggle = viewModel::setFolderSyncEnabled,
|
||||
onClearReflowCache = { showClearReflowCacheDialog = true },
|
||||
onRecentFilesLimitChange = viewModel::setRecentFilesLimit
|
||||
onRecentFilesLimitChange = viewModel::setRecentFilesLimit,
|
||||
onTabsToggle = viewModel::setTabsEnabled
|
||||
)
|
||||
} else {
|
||||
ContextualTopAppBar(
|
||||
|
|
@ -769,7 +766,8 @@ fun DefaultTopAppBar(
|
|||
onAboutClick: () -> Unit,
|
||||
onShowDeviceManagement: () -> Unit,
|
||||
onFolderSyncToggle: (Boolean) -> Unit,
|
||||
onRecentFilesLimitChange: (Int) -> Unit
|
||||
onRecentFilesLimitChange: (Int) -> Unit,
|
||||
onTabsToggle: (Boolean) -> Unit
|
||||
) {
|
||||
var showOptionsMenu by remember { mutableStateOf(false) }
|
||||
var showLimitMenu by remember { mutableStateOf(false) }
|
||||
|
|
@ -822,6 +820,17 @@ fun DefaultTopAppBar(
|
|||
showOptionsMenu = false
|
||||
})
|
||||
|
||||
HorizontalDivider()
|
||||
|
||||
DropdownMenuItem(text = { Text("Enable Multi-Tab Reading") }, onClick = {
|
||||
onTabsToggle(!uiState.isTabsEnabled)
|
||||
showOptionsMenu = false
|
||||
}, trailingIcon = {
|
||||
if (uiState.isTabsEnabled) {
|
||||
Icon(Icons.Default.Check, contentDescription = "Enabled")
|
||||
}
|
||||
})
|
||||
|
||||
HorizontalDivider()
|
||||
DropdownMenuItem(text = { Text(stringResource(R.string.options_clear_book_cache)) }, onClick = {
|
||||
onClearCache()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue