Library improvements (#163)

* Improved local folder sync and file management by migrating sidecar metadata to a dedicated subfolder and enhancing book ID stability.

* Optimized folder sync and increased synced folder limits.

* Added support for managing active tabs in the `HomeScreen`.

* Added support for strict file type filtering when picking documents.
This commit is contained in:
Aryan 2026-04-10 17:49:37 +05:30 committed by GitHub
parent 49e08cc9f1
commit 12d50bb68d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 482 additions and 122 deletions

View file

@ -215,8 +215,9 @@ fun LibraryScreen(
if (isContextualModeActive) {
viewModel.clearContextualAction()
}
val mimeTypes = if (uiState.useStrictFileFilter) MainViewModel.SUPPORTED_MIME_TYPES else arrayOf("*/*")
try {
pickFileLauncher.launch(arrayOf("*/*"))
pickFileLauncher.launch(mimeTypes)
} catch (_: android.content.ActivityNotFoundException) {
Timber.w("OpenDocument picker failed. Falling back to GetMultipleContents.")
try {
@ -1553,7 +1554,7 @@ private fun FolderSyncScreen(
Scaffold(
floatingActionButton = {
if (syncedFolders.size < 3) {
if (syncedFolders.size < 10) {
ExtendedFloatingActionButton(
text = { Text(stringResource(R.string.fab_add_folder)) },
icon = { Icon(Icons.Default.Add, "Add") },