The abstraction was useful for handling 2 systems, but it's no longer needed. Cleaning it up will make migrating to domain models easier down the line.
* Revert "Use SharedFlow for available extensions to always emit the value (#7609)"
This reverts commit 73901f50c0.
* ExtensionPresenter: Explicitly set refreshing status
* Scope coroutines job to presenter
* cleanup
* fix toast
* Save read duration to backup
* Add default value
Co-authored-by: Andreas <andreas.everos@gmail.com>
Co-authored-by: Andreas <andreas.everos@gmail.com>
only on updates and history screen for now, but the required changes on app bar
is there.
also fix missing incognito-downloaded mode indicator on history screen
* Use Stable interface for Updates screen + Cleanup
Co-Authored-By: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
* Disable swipe refresh in selection mode
* Review Changes
Co-Authored-By: Andreas <6576096+ghostbear@users.noreply.github.com>
* Review Changes 2
Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
* MangaScreen: Disable swipe refresh on action mode
* MangaPresenter: Add distinctUntilChanged to db flow
Now will only emit update when the related entry is changed
- Toolbar not having padding in landscape
- Fix library always refreshing everything even though user is refreshing category
- Tab text using primary color
- Fix Grid having to big of a top padding
- Fix Pager crashing when initial page is greater than the number of categories
- Migrate sources filter screen to full compose
- Use standard "OK"/"Cancel" actions for delete category dialog
- Abstract some AppBar logic
- Remove some dead code
- Group related strings
* Migrate Updates screen to compose
* Review Changes + Cleanup
Remove more unused stuff and show confirmation dialog when mass deleting chapters
* Review Changes 2 + Rebase
This lets us make it more consistent with the Compose screens for now. Maybe it'll return in the future.
This also includes making the AboutController a full Compose controller with a new abstracted TopAppBar composable.
- Replace ExtensionManager relay and observable with Flow
- Inverse SourceManager dependency
- SourceManager observers ExtensionManager flow
- Separate SourceData from SourceRepository as it created a circular dependency
* Little cleanup for stub source
Fixes instances where name shows up blank for stub sources
* Review Changes
Co-authored-by: Andreas <andreas.everos@gmail.com>
Co-authored-by: Andreas <andreas.everos@gmail.com>
- Turn on `foreign_keys` to cascade on delete properly
- Turn on `journal_mode` and set `synchronous` to NORMAL which may help performance for larger libraries
* MangaScreen: Improve chapter list scrolling performance
Process chapter title, date and read progress string ahead of time
* Use enum for contentType and add key
* Increased touch target
* Fix downloaded icon smaller than other states
* Deferred state reads to minimize recompose works
* Move things around to eliminate unnecessary elements
* Use Compose for Category screen
* Use correct string for CategoryRenameDialog title
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
* Add new "Lavender" theme
* Add light theme values for Lavender theme
* Fix order of enums
* Fix accented UI elements in set categories sheet being different colors
Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
(cherry picked from commit ad106bd884)
Instead of just checking whether the current app version *matches* with
latest app version in GitHub Releases, compare the semver from the tag
names to check whether the latter is greater and the app needs an update
Reference: semver spec #11https://semver.org/#spec-item-11
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
(cherry picked from commit e7ed130f2a)
Currently, manually created backups contain list of categories even if
Categories option is not selected during Backup Prompt. This leads to
empty categories being created when restoring such backup files
This commit adds a check before saving categories list info to the
backup file. The check is the same check which is used while backing up
category info of manga in library
Tested and worked successfully on app installed on Android 12
(cherry picked from commit 11c01235ac)
Generally seems fine. People with weak devices may experience some issues, but they can toggle it off/extract the archives separately if needed.
(cherry picked from commit 883945e3e8)
- Uses the new `asObservable` function to change the database calls to use SQLDelight, which should make the impact minimal when it comes to bugs.
- Use interactors where they already exist
- The todos are for the Compose rewrite
- Removed unused StorIO methods/queries
- Tested loading library, move manga to new category, unfavorite multiple manga, move multiple manga from one category to another, change filter, sort and display settings (with and without per category settings), (un)mark chapters, start/delete downloads
Thank Syer for asObservable
Co-authored-by: jobobby04 <17078382+jobobby04@users.noreply.github.com>
Co-authored-by: jobobby04 <17078382+jobobby04@users.noreply.github.com>
* Add new "Lavender" theme
* Add light theme values for Lavender theme
* Fix order of enums
* Fix accented UI elements in set categories sheet being different colors
Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
* Use sqldelight in migration
* Some more changes
Co-Authored-By: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
* Review Changes
* Review changes 2
* Review Changes 3
* Review Changes 4
Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
* Add cancel button in app update download notif
Since stuck downloads are a common issue and only solution until now was
to force close the app or download and update the app manually by
downloading from GitHub (which clears the notif away)
Based on commit
4dea924337
Co-authored-by: Jays2Kings <8617760+Jays2Kings@users.noreply.github.com>
* Linting by Android Studio
* commit PR Review Suggestion
Update app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt
Co-authored-by: arkon <arkon@users.noreply.github.com>
* Use `launchIO`
copied this over from how j2k was doing it. Launching in IO Thread like
how it was before this PR is sufficient
* Clear previous actions before adding `Cancel`
Otherwise, it led to two identical Cancel buttons
Co-authored-by: Jays2Kings <8617760+Jays2Kings@users.noreply.github.com>
Co-authored-by: arkon <arkon@users.noreply.github.com>
* Fix Links to Changelog/Readme/Commits for `multisrc`
working basic fix. Needs to be refactored into `createUrl()`
* Refactor back into `createUrl`
hopefully the logic is understandable
there's three cases:
- when multisrc, if `path` isn't mentioned, then we're trying to open
commmit history
- when multisrc, if `path` is mentioned, then its either a changelog or
a readme to a multisrc extension, the files are stored in the
`overrides` subfolder
- when not multisrc, we're looking at a single source where the links
are constructed in the same way regardless of it being
changelog/readme/commit history
Co-Authored-By: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
* Make `syncChaptersWithSource` use sqldelight
Will break chapter list live update on current ui
Co-Authored-By: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
* Review Changes
Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
- Protobuf backups have been around for 1.5 years now
- The ability to restore online-dependant data from JSON backups gets harder as time goes on and sources drift
- If users really need a way to restore them, they can use an older version of the app, or a separate tool for translating between the formats could be created
* MangaUpdates tweaks
* Review changes
Co-authored-by: arkon <4098258+arkon@users.noreply.github.com>
* Use built in functions instead of Jsoup
Co-authored-by: arkon <4098258+arkon@users.noreply.github.com>
* Fixes: incorrect sorting when chapter name contains hyphens '-'
* Added a test case for hyphen in ChapterRecognitionTest.kt
* Removed chapter range test case since it will be replaced by chapterContainingHyphensCase
* Detect identical mangas when long pressing to add to library
* Use extracted duplicate manga dialog to avoid duplication
* Partially revert previous commit
* Review changes
* Review changes part 2
* Fixes:
- spliiting fails when the page was already been split and processed before
- Moved CBZ logic a little earlier to avoid marking a download as complete before the CBZ compression was completed
* Added a single space for readablity
* Added 2 spaces for readability
* Moved the splitting logic to happen inside getOrDownloadImage()
* Minor cleanup
* - Improved error handling when splitting fails due to OOM exception caused by BitmapFactory.decodeFile. - Changed logic from throwing error to only notify to allow the download to complete even if splitting failed.
* reverted auto formatting changes
* removed an extra loop
* Merged to Upstream, cleaned up
* Removed unused localized string
* Minor cleanup
- Add pending intent immutable flags to satisfy lint warnings
- Change AddDuplicateMangaDialog arg to a function instead to avoid leaking controller-specific logic into it
- Require WebView 99+
Instead of just checking whether the current app version *matches* with
latest app version in GitHub Releases, compare the semver from the tag
names to check whether the latter is greater and the app needs an update
Reference: semver spec #11https://semver.org/#spec-item-11
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
Currently, manually created backups contain list of categories even if
Categories option is not selected during Backup Prompt. This leads to
empty categories being created when restoring such backup files
This commit adds a check before saving categories list info to the
backup file. The check is the same check which is used while backing up
category info of manga in library
Tested and worked successfully on app installed on Android 12
- Remove some unused StorIO queries
- Clean up tall image splitting a bit (no need for creating an unscaled scaled bitmap copy, or tracking coordinates)
- Clean up library updater a bit (still needs a lot of work though)
* Auto split long images to improve performance of reader
* Auto split long images to improve performance of reader - fixed the sorting
* Improved performance of splitting by getting rid of 1 extra loop
* Cleaned up code and moved the functionality to work during the downloading process (unsure how this affects download speed)
* Replaced the import .* with the actual used imports
* Fixes for Bugs discovered during my testing
* Fixed last split missing bug.
* Reordered the download progress to be updated before splitting instead of after to reflect more meaningful progress of download
* Reverted last commit since it had no effect
* Improved progress tracking when a download is paused then resumed.
* Implemented the recommended changes to enhance the feature.
* Apply suggestions from code review
Co-authored-by: arkon <arkon@users.noreply.github.com>
* Update app/src/main/res/values/strings.xml
Co-authored-by: arkon <arkon@users.noreply.github.com>
Co-authored-by: arkon <arkon@users.noreply.github.com>
* Make `HistoryState` similar to `MigrateState`
* Review Changes
* Also cache the transformation
Co-authored-by: Andreas <andreas.everos@gmail.com>
* Fix States
Co-authored-by: Andreas <andreas.everos@gmail.com>
* Migrate Source Filter Screen to Compose
* Changes from Review and some more fixes
* Rename some variable and classes
* Review Change
* Ewbase and Review changes
Some spring cleaning to remove some unnecessary complexity so things are easier to maintain.
- Start screen: redundant with app shortcuts in Android 7.1+
- Jump to chapters: irrelevant in tablet mode and people can scroll a tiny bit if they really have to
- Option to not scroll away bottom nav: issues with fast scroll will be irrelevant with it being replaced or removed in the Compose migrations
Get ready for people malding over their special needs. https://xkcd.com/1172/
* Use Compose in Source tab
* Replace hashCode with key function
* Add ability to turn off pins moving on top of source list
* Changes from review comments
* Migrate History screen database call to SQLDelight
- Move all migrations to SQLDelight
- Move all tables to SQLDelight
Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>
* Changes from review comments
* Add adapters to database
* Remove logging of database version in App
* Change query name for paging source queries
* Update migrations
* Make SQLite Callback handle migration
- To ensure it updates the database
* Use SQLDelight Schema version for Callback database version
Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>
* Migrate History screen to Compose
- Migrate screen
- Strip logic from presenter into use cases and repository
- Setup for other screen being able to migrate to Compose with Theme
* Changes from review comments
This is a partial revert/evolution of 538dd60580
- Back to notifications, because Android 12+ may cut off toasts
- Notifications now automatically dismiss after 30s on Android 8+ (taken from J2K)
- Also warn if more than 30 chapters are queued for download
Users should better curate their chapter folder/file names if need be. There's legit reasons for a chapter to start with or contain the same word(s) that the manga title consists of.
* Added basic move to top series feature
* Remove intermediate List
* Change text string
* Remove spanish manual translation
* Changed algorithm to use "partition"
Considering there's no pagination for this list, the data loading can take some
time. So this will show the existing refresh indicator instead of empty view
while the list is loading.
* Use existing worker for manual backup creation
This will show the "creating backup" notification when auto backup is
running. Complete or error notification will continue to be shown only on
manual job.
* Make sure disabling auto backup don't cancel running manual backup job
Reappear stably on the api30 Android Studio Emulator,
first save a large backup file,
then save a small backup file, overwriting the previous larger backup file,
so you get a backup file with a larger size but only the first part is meaningful,
* fix: getPageHolder would always return the first split, as they share the same index
* split pages have the same number, we need an extra check to know whether we move forward or back
* No title grid added to library and source
* Else added to display title in case image is null or empty
* No title grid renamed and now only available in library
* Spanish strings about cover only grid removed
Co-authored-by: micaelagimenez <micaela.gimenez@ext.prosegur.com>
* pan if the image is zoomed instead of navigating away
quickly display full landscape image before zooming to fit height in fit to screen
* add Tap to pan preference, defaults to true
add landscape zoom preference, defaults to false
* hide landscape image zoom option if scale is not fit screen
* fix landscape image zoom for first image and loading image
* properly reload pagerholders when landscape zoom option is changed
* enable landscape zoom by default
* added duplicate manga check
When adding a manga to your library, the app will go through each manga previously added and compare their names. If a match is detected, it will prompt the user and ask for confirmation. On this prompt there is also an option to view the other manga.
* added german translations for newly added strings
* Revert "added german translations for newly added strings"
This reverts commit 71ada620671651daeeb2546aecd02400a4bc86bc.
* changed `AlertDialog.Builder` to `MaterialAlertDialogBuilder`
* using SQL query instead of filtering entire library with Kotlin
* Reduce notifyDataSetChanged calls when category count is disabled
* Fix category tabs briefly showing when it's supposed to be disabled
Also fix tabs showing when activity recreated
* Lift appbar when tab is hidden
Check against tab visibility instead of viewpager
* Restore selected nav item after recreate
* Simplify SHORTCUT_MANGA intent handling
Don't need to change controller if the topmost controller is the target