* 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)
Allows users to search for the exact source ID in their library.
Similar to the Browse > Migrate screen, but filtered in the Library,
where users can take all the usual actions.
Could be used in the future to change the search behaviour of tapping
the source name in the title info view to search by the ID with this
prefix.
(cherry picked from commit 4e4bdffdf38043418685ab42b177c8476842c83c)
* fix: add support for `EnhancedTracker` to merged sources
* ref: readability
* fix: use only sources specific to the merged title
* fix: don't match using name
* formatting
* don't block, suspend
* Move merged source out of EnhancedTracker
* Extract Injekt
* Return first accepted merged manga
* Move getMergedSources to SourceManager and update usages accordingly
* simplify code
---------
Co-authored-by: Cuong-Tran <cuongtran.tm@gmail.com>
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
* feat(history): Allow multi-selection and batch reset for history items
* Use chapterId instead of history.id
* use remember getUiModel
* Toolbar selection mode
* cleanup History
* Replace selectedChapterIds with selection for chapter selection state
* Remove userSelected parameter from selection logic and related function signatures
* remove parentheses
* Fix range selection
* longclick on cover too
* disable clear-history button when none-selected
* Add Filters to Updates screen
Behaves basically like the filters in the library:
- Unread: Show/Don't show unread chapters
- Downloaded: Show/Don't show downloaded chapters
- Started: Show/Don't show chapters that have some progress but aren't
fully Read
- Bookmarked: Show/Don't show chapters that have been bookmarked
Started behaves differently from its Library counterpart because the
actual manga data is not available at this point in time and I thought
calling getManga for each entry without caching would be a pretty bad
idea.
I have modelled this closely on the filter control flow in the
Library, but I'm sure this can be simplified/adjusted in some way.
* Move most filtering logic to SQL
Unread, Started, and Bookmarked filters are now part of the SQL query.
Download state cannot be filtered in the database so it remains in
Kotlin.
Because the Downloaded filter has to be run in Kotlin, the combine
flow uses the preferences flow twice, once to get the SQL query params
and once for the Kotlin filters (only Downloaded at this time).
* Add "Hide excluded scanlators" to update filters
Based on the work done in mihonapp/mihon#1623 but integrated with the other filters
in this PR. Added the user as a co-author for credit.
Co-authored-by: Dani <17619547+shabnix@users.noreply.github.com>
---------
Co-authored-by: Dani <17619547+shabnix@users.noreply.github.com>
---------
* Merge Panorama toggle into Filter diaglog
* Make Panorama toggle persistent and share it with History
* Implement toggleSwitch method for preference management to avoid create new function on every composition
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
(cherry picked from commit bbe9aa8561360f030072fbc49f79748e71c6535e)
* Include romanized titles of the original language in description
* Implement handling for `finalChapterInDesc` preference.
* Handle `preferExtensionLangTitle` preference when fetching manga details.
* Address some warnings, clean up unused code and spotless apply.
(cherry picked from commit 582d0ef1219ae2a2e1dd275d969b35a2e5511a73)
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
* Support mass migration in 'Browse -> Migrate' (mihonapp/mihon#2338)
(cherry picked from commit 22f851173b1eca242645f328a46e6038c035d5ec)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
There is no way to trigger mass migration at the moment. The functionality will be added in a follow up PR.
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit ee19050cc00b0a787af65b641624d07bb194e155)
* Fix background crash in mass migration screen
(cherry picked from commit 63943debc2fd4efa1a0418bbfefaea93a24b49fd)
* Fix same manga check logic in mass migration
(cherry picked from commit f1193866f4306384a2a466c6353446bfed2bd9aa)
* Fix migration progress not updating and category flag mischeck (mihonapp/mihon#2484)
- Fixed an issue where migration progress wasn't updated after a manual source search
- Fixed incorrect logic where the category migration flag was ignored due to checking the chapter flag instead
(cherry picked from commit 16b5317b90b3064d12aa38f687cc30110fd8cdb3)
* Fix mass migration advanced search query building (mihonapp/mihon#2629)
(cherry picked from commit 7c08b75555a5444ede4912dc5e32607fac2b9678)
* Fix mass migration not using the same search queries as individual migration (mihonapp/mihon#2736)
(cherry picked from commit 7161bc2e825bdfd66a1829f7dce42bd0570b1008)
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
* Merged `MigrationItem`, `MigrationItemResult`, and `MigrationActionIcon` into `MigrationListItem` variants within `MigrationListScreenContent.kt` for better cohesion.
* Simplified `MigrationListScreen` and `MigrationListScreenModel` by removing `MigrationProcedureConfig` and `MigrationType` in favor of direct parameters (`mangaIds`, `extraSearchQuery`).
* Renamed `newSelectedItem` to `matchOverride` in migration screens.
* Updated `SmartSourceSearchEngine` and `BaseSmartSearchEngine` method names for clarity: `smartSearch` -> `regularSearch` and `normalSearch` -> `deepSearch`.
* Refactored search result states: `SearchResult.Result` is now `SearchResult.Success`.
* Improved `MigrationMangaDialog` and `MigrationExitDialog` by standardizing parameter names and structure.
* Inlined `BrowseSourceFloatingActionButton` logic into `SourceFeedScreen` and `MigrateSourceSearchScreen` using standard `SmallExtendedFloatingActionButton`.
* Cleaned up various internal field names and logic related to "unmatched" vs "not found" entries.
- Relocates migration process screens, models, and components from `eu.kanade` and `exh` packages to a unified `mihon.feature.migration.list` package.
- Renames `MigrationListScreen` (presentation) to `MigrationListScreenContent` to avoid naming conflicts with the UI screen.
- Moves `SmartSourceSearchEngine` and `BaseSmartSearchEngine` to `mihon.feature.migration.list.search`.
- Updates all affected imports across the project.
- Replaces the legacy `MigrationBottomSheetDialog` (which used View binding) with the newer Compose-based `MigrationConfigScreenSheet`.
- Deletes `MigrationBottomSheetDialog.kt` and its associated layout XML `migration_bottom_sheet.xml`.
- Adds a `fullSettings` flag to `MigrationConfigScreenSheet` to support a simplified UI mode by hiding advanced search and priority options.
- Updates the primary button text in the sheet based on the `fullSettings` state.
- Exposes `preferences` in `MigrationListScreenModel` to facilitate the sheet migration.
(cherry picked from commit 0e0b6d92833f8e4f3aebdcc1f7c8c175084175d6)
Fix extra padding appearing in reader after user interactions (mihonapp/mihon#2669)
(cherry picked from commit aa300cb53ea3a02b63c3b3f3fca60d5e7533a8f1)
- Removes `BoxIgnoreLayoutDirection` wrapper and related `CompositionLocalProvider` logic.
- Integrates vertical `ChapterNavigator` directly into the main `Column` layout using `Modifier.weight(1f)`.
- Replaces separate `AnimatedVisibility` blocks for vertical navigation with a single `when` branch inside the main UI structure.
- Refines positioning for `NavBarType.VerticalLeft` and `NavBarType.VerticalRight`.
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
(cherry picked from commit 3e6afee13b9fd5716f7f2d547b3edcd3e17915db)
This reverts part of commit 3ab83f1270.
Previously, the app made one request for the search, and then fired
off 1 request per search result to obtain additional data, such as
each title's synopsis, etc.
However, MAL's search allows field selection during the initial query,
which will return all the data in that first response, avoiding the
massive bunch of requests (and alleviating some pressure on MAL from
our userbase).
By combining the selected fields into one constant, I was able to also
get rid of the MALUserListSearch entirely because it was redundant.
This allows for a unified MALManga->TrackSearch helper, further
reducing complexity.
I got to my "11x" improvement because on page of search results has 10
elements, and this change turns 11 (1+10 for results) requests into 1.
(cherry picked from commit 9bf2d78a421213b1885456f5b54c3286edc539e1)
Due to a `Float->Double->Float` conversion somewhere inside Mihon, the
tracker sees 2.1 as 2.0999999046325684, which means this filter ignores
the 2.1 chapter (which we just tried to mark as read). This small
epsilon is small enough to never bother any serious usage, but large
enough to ignore any such conversion errors.
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit bd5c4d48f980d2d3dcc1112fe499dba17ef8e507)