* Fix migration's selected sources order not preserved
(cherry picked from commit 47816d4b218e6a62ef9fcd3097b6b0b8f2f95b17)
* Use indexed map for improved sorting performance
---------
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
* Utilize tracker for library duplicate detection (#2978)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 89bbdb17fb4ed1cbe99c14f389940e0f91093a10)
* Avoid crash due to duplicate manga ID when there are more than 1 trackers
* Add index for duplicate library manga detection in manga_sync
---------
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
* chore: Refactor selection state management and improve performance across various screens
* **MigrateMangaScreen**: Refactor state management to use a `Set<Long>` of IDs for selection instead of a list of wrapper items.
* **LibraryUpdateErrorScreen**: Simplify `onErrorSelected` signature by removing the unused `userSelected` parameter and clean up related UI components.
* **Performance**: Use `remember(state.selection)` in `MigrateMangaScreen` for efficient selection status lookups.
* **Code Quality**: Fix minor typos (e.g., `inbetweenItem` to `inBetweenItem`) and optimize imports.
* Refactor selection logic to prevent redundant state updates
* Move early exit checks for item selection status outside or to the beginning of state update blocks to avoid unnecessary recompositions.
* Improve safety and correctness of item selection by returning early from state updates when an item index is not found.
* Standardize selection checks across `HistoryScreenModel`, `LibraryUpdateErrorScreenModel`, `MigrateMangaScreenModel`, `UpdatesScreenModel`, and `MangaScreenModel`.
* update selection when migration list got updated
* Update state management to reset selection and loading status on fetch failure
* use remember getUiModel
* update headerIndexes to use remember for state management
* Refactor LibraryUpdateErrorScreen to improve state management
* Move header index calculation from the screen model to the presentation layer.
* Optimize UI model and header index memoization using `remember(state)`.
* Remove redundant `LaunchedEffect` and simplify scroll-to-index logic.
* Refactor LibraryUpdateErrorScreen to enhance state management with derivedStateOf
* Update `excluded_scanlators` index to a composite index on `manga_id` and `scanlator`.
* Convert `idx_history_last_read` into a partial index for entries where `last_read > 0`.
* Remove redundant `idx_manga_sync_manga_id` index.
* Remove unused `last_modified_at` column and its associated trigger from `mangas_categories`.
* Sync migration files with schema changes.
* fix(trackers-mangadex): Handle nullability in `createMdListTrack`
* Return null instead of throwing exception in initial track creation
* Improve error handling in `createMdListTrack`
* Change exception to return null when track not found
* handle nullability in MangaDex tracking
* feat: split "sync on add" into separate metadata and chapter fetch preferences
* refactor: remove redundant SnackbarHostState and error snackbars when auto sync entries
* clean other languages strings
* feat(migration): Allow skipping smart search for single entry migration
Introduces a "Smart search" setting when migrating a single manga, allowing users to choose between an automated best-match search or manual selection directly.
* ensure manual migration is only triggered once
* Add UI toggle
* refactor pref
* Replace deprecated rememberPlainTooltipPositionProvider
* Remove superfluous when branch
This when is marked as exhaustive.
* Replace deprecated LibrariesContainer call
AboutLibraries now wants us to produce the libraries ourselves.
* Replace deprecated ClipboardManager with Clipboard
Clipboard uses suspend functions, hence the coroutine scope addition.
* Use multi-dollar strs to simplify GraphQL queries
These have been available since Kotlin 2.1.
* Remove various redundant casts & conversions
- WebViewScreenContent: loadingState is in the LoadingState.Loading
branch, no need to cast at all
- Bangumi: username is not modified, make val
- Kavita: token is already a String
- PagerViewerAdapter: insertPageLastPage is already null-checked
- PagerViewerAdapter: use reified filterIsInstance
- ReaderViewModel: chapter IDs are already Longs
- CloudflareInterceptor: webview is smart-cast to non-null here
* Replace deprecated MenuAnchorType
Literally just a typealias for ExposedDropdownMenuAnchorType anyway.
* OptimizeNonSkippingGroups is enabled by default
* Suppress shadowing warning
This is explicitly intentional according to the KDocs.
* Migrate Context Receivers to Context Parameters
Requires changing the compiler arg, but that is part of the migration:
https://blog.jetbrains.com/kotlin/2025/04/update-on-context-parameters
Apparently, the only visible change is that names are required now.
"_" can be used for anonymous context parameters.
* Fix expression bodies with explicit return
Naming conflict resolved by aliasing.
From 2.4/2.5 onward, these will only be allowed with explicit return
types, or have to be turned into a block body. I opted for the latter
since the function is reasonably dense already.
see: https://youtrack.jetbrains.com/issue/KTLC-288
* Suppress deprecation of non-AutoMirrored icons
We use these arrows for navigation in the Upcoming screen.
I strongly doubt the AutoMirrored versions would make sense for our
use-case.
* Explicitly opt-in to new annotation default rules
affects the following annotated value-parameters:
- Preference.SliderPreference.steps (`@IntRange`)
- ReaderViewModel.State.brightnessOverlayValue (`@IntRange`)
- ReadingMode.iconRes (`@DrawableRes`)
- MigrationListScreenModel.Dialog.Progress.progress (`@FloatRange`)
see: https://youtrack.jetbrains.com/issue/KT-73255
see: https://github.com/Kotlin/KEEP/blob/change-defaulting-rule/proposals/annotation-target-in-properties.md
Warning message was the following:
This annotation is currently applied to the value parameter only, but in the future it will also be applied to field.
- To opt in to applying to both value parameter and field, add '-Xannotation-default-target=param-property' to your compiler arguments.
- To keep applying to the value parameter only, use the '@param:' annotation target.
(cherry picked from commit b543bc089a442c5e93b0fb6c83bc4037740b1eb5)
* Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (195 of 195 strings)
Translation: Komikku-App/Komikku
Translate-URL: https://hosted.weblate.org/projects/komikku-app/komikku/zh_Hant/
* Translated using Weblate (Catalan)
Currently translated at 17.9% (35 of 195 strings)
Translation: Komikku-App/Komikku
Translate-URL: https://hosted.weblate.org/projects/komikku-app/komikku/ca/
* Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (197 of 197 strings)
Translation: Komikku-App/Komikku
Translate-URL: https://hosted.weblate.org/projects/komikku-app/komikku/zh_Hant/
* Translated using Weblate (Filipino)
Currently translated at 87.3% (180 of 206 strings)
Translation: Komikku-App/Komikku
Translate-URL: https://hosted.weblate.org/projects/komikku-app/komikku/fil/
* Translated using Weblate (Catalan)
Currently translated at 16.9% (35 of 206 strings)
Translation: Komikku-App/Komikku
Translate-URL: https://hosted.weblate.org/projects/komikku-app/komikku/ca/
---------
Co-authored-by: ɴᴇᴋᴏ <s99095lkjjim@gmail.com>
Co-authored-by: Salvador Rodó Coll <salvador.rodo@gmail.com>
Co-authored-by: Infy's Tagalog Translations <ced.paltep10@gmail.com>
Co-authored-by: Cuong Tran <cuongtran.tm@gmail.com>