Update v1.0.49 (#330)

* Added PDF top tab strip visibility toggle and fixed WebView hit test NPE

* Refactored desktop reader screens and state management into specialized components

* Added image gallery to reader sidebar and refactored desktop PDF UI components

* Implemented EPUB image gallery

* Refactored reader and library models to use shared common types, centralizing file type resolution and texture management while removing redundant mapping logic

* Standardized UI styling and refactored app navigation layout

* Implemented auto-hiding reader chrome and activity tracking in desktop

* Refactored reader panels into distinct left and right modal layers with platform-specific sizing and keyboard navigation support.

* Added PPTX support for desktop and refactored parsing into a shared module

* Implement paid AI features and account management for the desktop application.

* Implement AI Hub and enhanced Cloud TTS integration for Desktop

* Implement streaming support for AI definition and summarization features

* Implement support for password-protected PDFs and file actions in the desktop reader.

* Implement cloud synchronization for desktop using Firestore and Google Drive

* Implement PDF reflow and "Text View" for the desktop reader

* Refactor OPDS logic to use SharedOpdsController

* Optimize PDF tile rendering performance

* Implement two-page spread support for PDF pagination

* Implement two-page spread support for the PDF viewer

* Improved shared spread zoom in PDF viewer

* Improve PDF spread navigation with fling support and configurable page gaps

* Add brightness control to PDF and EPUB readers

* Refactor folder synchronization to use shared logic engine

* Implement safe string formatting and validation for localized resources

* Implement TTS chunk skip navigation

* Implement deep-linking and playback controls for TTS media sessions

* Implement start index for TTS playback

* Improve TTS navigation, prefetching, and notification duration reporting

* Implement TTS mini playback bar for background reading

* Implement multi-window reader support for the desktop application

* Improve desktop modal window management and visibility syncing

* Implement localized string support for Desktop and shared UI

* Implement language selection and persistence for Desktop

* Implement plural string support for Desktop and migrate hardcoded counts to plurals.xml

* Implement localized banner messages and UI strings using resource-backed SharedText

* Implement compact badge styling for small book covers

* Refactor PDF native interaction and improve HTML import memory safety

* fix language persistence

* Refactor reader overflow menus to use section-based logic

* Refactor PDF layout remapping and improve text box interaction

* Improve CFI resolution and TTS resume accuracy using dynamic chunk offsets

* Centralize PDF annotation export mapping and improve metadata handling

* Add support for threaded comments in PDF highlight annotations

* Flatten highlight comments into a single thread for PDF export and allow author editing

* Integrate page slider into reader chrome and persist toggle state

* Handle fragments and queries in EPUB chapter paths

* Implement dynamic, theme-aware coloring for the reader slider

* Implement customizable app-wide font preference

* Implement one-hand zoom gestures in the PDF viewer

* Implement File Information dialog for PDF and EPUB readers

* Bump version to 1.0.49 (53)

* Refactor PDF reader logic into modular components

* Add ProGuard rules to prevent R8 optimization issues in EPUB reader screens

* Add option to use PDF filenames as display names

* Fix preservation of PDF filename display preference in library projection
This commit is contained in:
Aryan 2026-05-20 22:14:01 +05:30 committed by GitHub
parent dc5196526f
commit 9510293ac3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
245 changed files with 37538 additions and 12460 deletions

View file

@ -5,31 +5,34 @@ import com.aryan.reader.data.BookTagCrossRef
import com.aryan.reader.data.RecentFileItem
import com.aryan.reader.data.ShelfEntity
import com.aryan.reader.data.TagEntity
import com.aryan.reader.shared.AddBooksSource as SharedAddBooksSource
import com.aryan.reader.shared.AppContrastOption as SharedAppContrastOption
import com.aryan.reader.shared.AppThemeMode as SharedAppThemeMode
import com.aryan.reader.shared.BannerMessage as SharedBannerMessage
import com.aryan.reader.shared.BookItem as SharedBookItem
import com.aryan.reader.shared.BookShelfRef as SharedBookShelfRef
import com.aryan.reader.shared.CustomAppTheme as SharedCustomAppTheme
import com.aryan.reader.shared.EpubAnnotationSerializer
import com.aryan.reader.shared.FileType as SharedFileType
import com.aryan.reader.shared.LibraryFilters as SharedLibraryFilters
import com.aryan.reader.shared.ReadStatusFilter as SharedReadStatusFilter
import com.aryan.reader.shared.RenderMode as SharedRenderMode
import com.aryan.reader.shared.SharedReaderScreenState
import com.aryan.reader.shared.Shelf as SharedShelf
import com.aryan.reader.shared.ShelfRecord
import com.aryan.reader.shared.ShelfType as SharedShelfType
import com.aryan.reader.shared.SortOrder as SharedSortOrder
import com.aryan.reader.shared.SyncedFolder as SharedSyncedFolder
import com.aryan.reader.shared.Tag as SharedTag
fun FileType.toSharedFileType(): SharedFileType = this
fun SharedFileType.toAndroidFileType(): FileType = this
fun LibraryFilters.toSharedLibraryFilters(): SharedLibraryFilters = this
fun SharedLibraryFilters.toAndroidLibraryFilters(): LibraryFilters = this
fun SyncedFolder.toSharedSyncedFolder(): SharedSyncedFolder = this
fun SharedSyncedFolder.toAndroidSyncedFolder(): SyncedFolder = this
fun RecentFileItem.toSharedBookItem(): SharedBookItem {
return SharedBookItem(
id = bookId,
path = uriString,
type = type.toSharedFileType(),
type = type,
displayName = customName ?: displayName,
timestamp = timestamp,
coverImagePath = coverImagePath,
@ -67,7 +70,7 @@ fun SharedBookItem.toRecentFileItem(
return androidBooksById[id]?.copy(tags = resolvedTags)
?.copy(
uriString = path,
type = type.toAndroidFileType(),
type = type,
displayName = androidBooksById[id]?.displayName ?: displayName,
timestamp = timestamp,
coverImagePath = coverImagePath,
@ -92,7 +95,7 @@ fun SharedBookItem.toRecentFileItem(
?: RecentFileItem(
bookId = id,
uriString = path,
type = type.toAndroidFileType(),
type = type,
displayName = displayName,
timestamp = timestamp,
coverImagePath = coverImagePath,
@ -169,11 +172,11 @@ fun ReaderScreenState.toSharedReaderScreenState(
return SharedReaderScreenState(
selectedBookId = selectedBookId,
selectedUriString = selectedPdfUri?.toString() ?: selectedEpubUri?.toString(),
selectedFileType = selectedFileType?.toSharedFileType(),
selectedFileType = selectedFileType,
isLoading = isLoading,
errorMessage = errorMessage,
renderMode = renderMode.toSharedRenderMode(),
sortOrder = sortOrder.toSharedSortOrder(),
renderMode = renderMode,
sortOrder = sortOrder,
viewingShelfId = viewingShelfId,
isAddingBooksToShelf = isAddingBooksToShelf,
showCreateShelfDialog = showCreateShelfDialog,
@ -181,7 +184,7 @@ fun ReaderScreenState.toSharedReaderScreenState(
libraryScreenStartPage = libraryScreenStartPage,
showRenameShelfDialogFor = showRenameShelfDialogFor,
showDeleteShelfDialogFor = showDeleteShelfDialogFor,
addBooksSource = addBooksSource.toSharedAddBooksSource(),
addBooksSource = addBooksSource,
booksSelectedForAdding = booksSelectedForAdding,
selectedBookIds = contextualActionItems.mapTo(mutableSetOf()) { it.bookId },
selectedShelfIds = contextualActionShelfIds,
@ -189,10 +192,10 @@ fun ReaderScreenState.toSharedReaderScreenState(
credits = credits,
isSyncEnabled = isSyncEnabled,
isFolderSyncEnabled = isFolderSyncEnabled,
bannerMessage = bannerMessage?.toSharedBannerMessage(),
bannerMessage = bannerMessage,
downloadingBookIds = downloadingBookIds,
uploadingBookIds = uploadingBookIds,
syncedFolders = syncedFolders.map { it.toSharedSyncedFolder() },
syncedFolders = syncedFolders,
lastFolderScanTime = lastFolderScanTime,
hasUnreadFeedback = hasUnreadFeedback,
searchQuery = searchQuery,
@ -204,7 +207,7 @@ fun ReaderScreenState.toSharedReaderScreenState(
rawLibraryBooks = rawBooks.map { it.toSharedBookItem() },
pinnedHomeBookIds = pinnedHomeBookIds,
pinnedLibraryBookIds = pinnedLibraryBookIds,
libraryFilters = libraryFilters.toSharedLibraryFilters(),
libraryFilters = libraryFilters,
recentFilesLimit = recentFilesLimit,
isTabsEnabled = isTabsEnabled,
openTabIds = openTabIds,
@ -213,12 +216,14 @@ fun ReaderScreenState.toSharedReaderScreenState(
showExternalFileSavePromptFor = showExternalFileSavePromptFor,
externalFileBehavior = externalFileBehavior,
useStrictFileFilter = useStrictFileFilter,
appThemeMode = appThemeMode.toSharedAppThemeMode(),
appContrastOption = appContrastOption.toSharedAppContrastOption(),
usePdfFileNameAsDisplayName = usePdfFileNameAsDisplayName,
appThemeMode = appThemeMode,
appContrastOption = appContrastOption,
appTextDimFactorLight = appTextDimFactorLight,
appTextDimFactorDark = appTextDimFactorDark,
appSeedColor = appSeedColor,
customAppThemes = customAppThemes.map { it.toSharedCustomAppTheme() },
appFontPreference = appFontPreference,
customAppThemes = customAppThemes,
allTags = dbTags.map { it.toSharedTag() },
showTagSelectionDialogFor = showTagSelectionDialogFor
)
@ -271,7 +276,7 @@ fun SharedShelf.toAndroidShelf(
return Shelf(
id = id,
name = name,
type = type.toAndroidShelfType(),
type = type,
books = books.map { it.toRecentFileItem(androidBooksById, tagEntitiesById) },
directBooks = directBooks.map { it.toRecentFileItem(androidBooksById, tagEntitiesById) },
parentShelfId = parentShelfId,
@ -280,91 +285,3 @@ fun SharedShelf.toAndroidShelf(
sortKey = sortKey
)
}
fun FileType.toSharedFileType(): SharedFileType {
return this
}
fun SharedFileType.toAndroidFileType(): FileType {
return this
}
fun RenderMode.toSharedRenderMode(): SharedRenderMode {
return this
}
fun SharedRenderMode.toAndroidRenderMode(): RenderMode {
return this
}
fun AddBooksSource.toSharedAddBooksSource(): SharedAddBooksSource {
return this
}
fun SharedAddBooksSource.toAndroidAddBooksSource(): AddBooksSource {
return this
}
fun SortOrder.toSharedSortOrder(): SharedSortOrder {
return this
}
fun SharedSortOrder.toAndroidSortOrder(): SortOrder {
return this
}
fun ReadStatusFilter.toSharedReadStatusFilter(): SharedReadStatusFilter {
return this
}
fun SharedReadStatusFilter.toAndroidReadStatusFilter(): ReadStatusFilter {
return this
}
fun LibraryFilters.toSharedLibraryFilters(): SharedLibraryFilters {
return this
}
fun SharedLibraryFilters.toAndroidLibraryFilters(): LibraryFilters {
return this
}
fun SyncedFolder.toSharedSyncedFolder(): SharedSyncedFolder {
return this
}
fun SharedSyncedFolder.toAndroidSyncedFolder(): SyncedFolder {
return this
}
private fun SharedShelfType.toAndroidShelfType(): ShelfType {
return ShelfType.valueOf(name)
}
fun BannerMessage.toSharedBannerMessage(): SharedBannerMessage {
return this
}
fun AppThemeMode.toSharedAppThemeMode(): SharedAppThemeMode {
return this
}
fun SharedAppThemeMode.toAndroidAppThemeMode(): AppThemeMode {
return this
}
fun AppContrastOption.toSharedAppContrastOption(): SharedAppContrastOption {
return this
}
fun SharedAppContrastOption.toAndroidAppContrastOption(): AppContrastOption {
return this
}
fun CustomAppTheme.toSharedCustomAppTheme(): SharedCustomAppTheme {
return this
}
fun SharedCustomAppTheme.toAndroidCustomAppTheme(): CustomAppTheme {
return this
}