Commit graph

5940 commits

Author SHA1 Message Date
AntsyLich
2beb89d531
Cleanup LibraryScreenModel LibraryMap.applySort and some more 2024-10-12 05:00:56 +06:00
brewkunz
44aab7a243
Retain remote last chapter read if it's higher than the local one for EnhancedTracker (#1301) 2024-10-10 18:15:06 +06:00
Secozzi
76e0aba70c
Fix AniList ALSearchItem.status nullibility (#1297)
Some checks failed
CI / Build app (push) Has been cancelled
2024-10-06 04:09:49 +06:00
AntsyLich
be671b42ce
Move firebase permission removal to standard flavor
And disable some more stuff
2024-09-18 17:37:33 +06:00
Roshan Varughese
9cc7d42dd9
Re-enable fetching chapters list for entries with licenced status (#1230)
Enable Licensed
2024-09-17 14:47:04 +06:00
MajorTanya
f5c6d2e1a6
Fix Kitsu synopsis nullability (#1233)
This time, the Kitsu API docs are silent on whether this field (or
any other field) can be null/undefined/etc, but it can happen and
caused an error during search and update. This change just ensures the
attribute is nullable and is set to an empty String when it is null.
2024-09-17 14:46:37 +06:00
AntsyLich
83fd4746ed
Use new library for injekt with inorichi patch 2024-09-08 20:09:45 +06:00
NGB-Was-Taken
c8ad6cdf31
Show toast for app restart when User-Agent is changed (#1204)
Some checks failed
CI / Build app (push) Has been cancelled
2024-09-07 14:15:22 +06:00
AntsyLich
6f422745ba
Reduce ChapterNavigator horizontal padding on small ui (#1202)
Co-authored-by: p
2024-09-07 14:14:42 +06:00
AntsyLich
bec549cc44
Use TextFieldState in BasicTextField where applicable (#1201)
Co-authored-by: p
2024-09-07 08:11:14 +00:00
bapeey
b56a97bb8e
Ignore "intent://" urls on webview (#1193)
ignore intent urls
2024-09-05 16:11:09 +06:00
AntsyLich
bd7b354198
Move archive related code to :core:archive 2024-09-05 16:00:46 +06:00
MajorTanya
001249a89d
Fix Kitsu ratingTwenty being typed as String (#1191)
The API docs and the responses type `ratingTwenty` as a "number" (Int
in Kotlin, it's divided by 2 for a .5 step scale 0-10). It's nullable
because an entry without a user rating returns `null` in that field.
2024-09-05 10:56:58 +06:00
AntsyLich
f22767d863
Fix mishap in 02af9b1acf 2024-09-03 17:32:19 +06:00
AntsyLich
02af9b1acf
Remove more unnecessary permissions from Firebase dependency 2024-09-03 17:22:39 +06:00
AntsyLich
3c611b95fb
Add crashlytics to standard builds 2024-09-03 15:45:19 +06:00
AntsyLich
fc1c804bfd
Migrate some classpaths to gradle plugins 2024-09-03 14:09:12 +06:00
Roshan Varughese
abfb72c89c
Option to update trackers when chapter marked as read (#1177)
* Track when marked as read

* Add dismiss to snack bar

* i18n & ignore decimal chapters

* Detekt would have caught that 🤣

* `Ok` > `Yes`

* Dont prompt if untracked or current > new

* Move to MangaScreenModel

* Suggestions

Co-Authored-By: AntsyLich <59261191+AntsyLich@users.noreply.github.com>

* Review 2

* toggleAllSelections first

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-09-03 03:41:44 +06:00
MajorTanya
9f99f038f3
Use DTOs to parse tracking API responses (#1103)
* Migrate tracking APIs to DTOs

Changes the handling of tracker API responses to be parsed to DTOs
instead of doing so "manually" by use of `jsonPrimitive`s and/or
`Json.decodeFromString` invocations.

This greatly simplifies the API response handling.

Renamed constants to SCREAMING_SNAKE_CASE.

Largely tried to name the DTOs in a uniform pattern, with the
tracker's (short) name at the beginning of file and data class names
(ALOAuth instead of OAuth, etc).

With these changes, no area of the code base should be using
`jsonPrimitive` and/or `Json.decodeFromString` anymore.

* Fix wrong types in KitsuAlgoliaSearchItem

This API returns start and end dates as Long and the score as Double.

Kitsu's docs claim they're strings (and they are, when requesting
manga details from Kitsu directly) but the Algolia search results
return Longs and Double, respectively.

* Apply review changes

- Renamed `BangumiX` classes to `BGMX` classes.
- Renamed `toXStatus` and `toXScore` to `toApiStatus` and `toApiScore`

* Handle migration from detekt to spotless

Removed Suppressions added for detekt.

Specifically removed:
- `SwallowedException` where an exception ends as a default value
- `MagicNumber`
- `CyclomaticComplexMethod`
- `TooGenericExceptionThrown`

Also ran spotlessApply which changed SMAddMangaResponse

* Fix Kitsu failing to add series

The `included` attribute seems to only appear when the user already
has the entry in their Kitsu list.

Since both `data` and `included` are required for `firstToTrack`, a
guard clause has been added before all its calls.

* Fix empty Bangumi error when entry doesn't exist

Previously, the non-null assertion (!!) would cause a
NullPointerException and a Toast with
"Bangumi error: " (no message) when the user had removed their list
entry from Bangumi through other means like the website.

Now it will show "Bangumi error: Could not find manga".

This is analogous to the error shown by Kitsu under these
circumstances.

* Fix Shikimori ignoring missing remote entry

The user would see no indication that Shikimori could not properly
refresh the track from the remote. This change causes the error Toast
notification to pop up with the following message
"Shikimori error: Could not find manga".

This is analogous to Kitsu and Bangumi.

* Remove usage of let where not needed

These particular occurrences weren't needed because properties are
directly accessible to further act upon. This neatly simplifies these
clauses.

* Remove missed let
2024-09-03 01:46:08 +06:00
AntsyLich
6c6ea84509
spotlessApply my beloved 2024-09-02 22:35:00 +06:00
AntsyLich
4ee31bfea5
Add stable marker to Manga data class
Co-authored-by: ivan <12537387+ivaniskandar@users.noreply.github.com>
2024-09-02 21:54:53 +06:00
AntsyLich
03eb756ecb
Collect MangaScreen state with lifecycle
Co-authored-by: ivan <12537387+ivaniskandar@users.noreply.github.com>
2024-09-02 21:22:21 +06:00
AntsyLich
a45eb5e528
PagerPageHolder: lazy init loading indicator
Co-authored-by: ivan <12537387+ivaniskandar@users.noreply.github.com>
2024-09-02 21:13:52 +06:00
AntsyLich
518abf032c
Remove legacy broken source and history backup 2024-08-30 11:36:34 +06:00
Roshan Varughese
7ca64a67c5
Hide keyboard when a Tracker SearchResultItem is clicked (#1168)
* Hide keyboard on select

* Code Review Suggestion
2024-08-27 18:26:55 +06:00
Catting
952a98c180
Add "show entry" action to download notifications (#1159)
* Add 'show entry' to download notifications

Signed-off-by: Catting <5874051+mm12@users.noreply.github.com>

* fixup! Add 'show entry' to download notifications

Signed-off-by: Catting <5874051+mm12@users.noreply.github.com>

* fixup! Add 'show entry' to download notifications

Signed-off-by: Catting <5874051+mm12@users.noreply.github.com>

* spotless! Add 'show entry' to download notifications

Signed-off-by: Catting <5874051+mm12@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>

* fixup! spotless- Apply suggestions from code review

Signed-off-by: Catting <5874051+mm12@users.noreply.github.com>

---------

Signed-off-by: Catting <5874051+mm12@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-08-26 19:31:02 +06:00
Roshan Varughese
45628b14db
Add confirmation when adding repo via URI (#1158)
* Add confirmation when adding repo via URI

* Blank lines

* Suggestions

* Reverting Changes

* Removing Unused Imports
2024-08-25 22:07:14 +06:00
Roshan Varughese
5dc6569a68
Respect privacy settings in extension update notification (#1156)
* Hide Extension Names in Update Notifications when Content is Hidden

* Moving `val` inside if

* [skip ci] Update CHANGELOG.md
2024-08-25 19:47:25 +06:00
Dani
ca968f162e
Add option to skip downloading duplicate read chapters (#1125)
* Add query to get chapter count by manga and chapter number

* Add functions to get chapter count by manga and chapter number

* Only count read chapters

* Add interactor

* Savepoint

* Extract new chapter logic to separate function

* Update javadocs

* Add preference to toggle new functionality

* Add todo

* Add debug logcat

* Use string resource instead of hardcoding title

* Add temporary logcat for debugging

* Fix detekt issues

* Update javadocs

* Update download unread chapters preference

* Remove debug logcat calls

* Update javadocs

* Resolve issue where read chapters were still being downloaded during manual manga fetch

* Apply code review changes

* Apply code review changes

* Revert "Apply code review changes"

This reverts commit 1a2dce78acc66a7c529ce5b572bdaf94804b1a30.

* Revert "Apply code review changes"

This reverts commit ac2a77829313967ad39ce3cb0c0231083b9d640d.

* Group download chapter logic inside the interactor GetChaptersToDownload

* Update javadocs

* Apply code review

* Apply code review

* Apply code review

* Update CHANGELOG.md to include the new feature

* Run spotless

* Update domain/src/main/java/mihon/domain/chapter/interactor/FilterChaptersForDownload.kt

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-08-23 15:43:46 +06:00
AntsyLich
d6252ab770
Address spotless lint errors (#1138)
* Add spotless (with ktlint)

* Run spotlessApply

* screaming case screaming case screaming case

* Update PagerViewerAdapter.kt

* Update ReaderTransitionView.kt
2024-08-19 18:11:39 +06:00
AntsyLich
777ae2461e
Remove detekt (#1130)
Annoying. More annoying in this project.
2024-08-19 12:51:37 +06:00
FooIbar
1c47a6b9b3
Add comment about RecyclerView cache size (#1119)
Note for forks: Increasing cache size may cause OOM on API < 26, better
to make it API 26+ only.
2024-08-13 22:03:10 +06:00
AntsyLich
9a34ace09c
Sync compose theme with MDC theme 2024-08-13 12:42:32 +06:00
MajorTanya
be124ebe86
Fix some migrations never running (#1114)
Both `SetupBackupCreateMigration` and `SetupLibraryUpdateMigration` were
trying to get the `App` class from Injekt which is never provided via
the `AppModule`. Using `Application` instead works since the
`workManager` property used by the respective `setupTask` functions is
an extension property on `Context`.

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-08-12 05:36:34 +06:00
AntsyLich
fdb96179c6
Handle Android SDK 35 API collision 2024-08-12 05:22:56 +06:00
Catting
c5994e057b
Add an "open in browser" button to reader menu (#1110)
* Add an "open in browser" button to reader menu

Signed-off-by: Catting <5874051+mm12@users.noreply.github.com>

* fixup! Add an "open in browser" button to reader menu

Signed-off-by: Catting <5874051+mm12@users.noreply.github.com>

---------

Signed-off-by: Catting <5874051+mm12@users.noreply.github.com>
2024-08-12 03:52:47 +06:00
AntsyLich
3f1d28c383
Fix UI freeze after migration
Fixes #938
2024-08-12 03:21:17 +06:00
AntsyLich
84b2164787
Add a button to select all scanlators
Resolves #943
Closes #1109
2024-08-12 02:51:13 +06:00
Catting
200d39e023
Add Copy Tracker URL on icon long press (#1101)
* Add Copy Tracker URL on icon long press

Signed-off-by: Catt0s <5874051+mm12@users.noreply.github.com>

* Add 'Copy To Clipboard' to tracker item menu

Signed-off-by: Catt0s <5874051+mm12@users.noreply.github.com>

* Add 'Copy link' to locales.

Signed-off-by: Catt0s <5874051+mm12@users.noreply.github.com>

* Implement code review suggestions
>
> Co-authored-by: AntsyLich  <59261191+AntsyLich@users.noreply.github.com>

Signed-off-by: Catt0s <5874051+mm12@users.noreply.github.com>

* Update app/src/main/java/eu/kanade/presentation/track/components/TrackLogoIcon.kt

---------

Signed-off-by: Catt0s <5874051+mm12@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-08-11 23:10:36 +06:00
MajorTanya
97c81fadb4
Fix MAL search results not showing start dates (#1098)
The previous approach would always throw an Exception because
`SimpleDateFormat.format()` expects the input to be of type `Date` or
`Number`, not `String`.
2024-08-11 22:55:13 +06:00
MajorTanya
9240eceedc
Change Kitsu to kitsu.app domain (#1106)
cf. 244fdccca9
2024-08-11 22:40:28 +06:00
AntsyLich
1c16fc79c2
ExpandableMangaDescription: Adjust size transform anim spec
Co-authored-by: ivan <12537387+ivaniskandar@users.noreply.github.com>
2024-08-07 14:30:39 +06:00
Roshan Varughese
31263084ec
Add Backup and Restore of Extension Repos (#1057)
* Backup/Restore Extension Repos

* Refactor

* Moving to Under App Settings

* Sort by URL, Check existing by SHA and Error Logging

Untested. Currently in a lecture and can't test if the changes really work.

* Changes to logic

* Don't ask me what's happening here

* Renaming Variables

* Fixing restoreAmount & changes to logic

Co-Authored-By: AntsyLich <59261191+AntsyLich@users.noreply.github.com>

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-08-07 13:49:17 +06:00
AntsyLich
2858ef835f
Rename backup restore error log file 2024-08-07 12:02:49 +06:00
FooIbar
854474f85f
Don't crash on ill-formed URLs (#1084) 2024-08-06 20:39:49 +06:00
FooIbar
a3dfd2efe6
Match extra layout space with scroll distance (#1076)
And increase recycler item view cache size.
2024-08-04 21:45:11 +06:00
Vetle Ledaal
de8ef6dad7
Improve error message if restoring from JSON file (#1056)
Some checks failed
CI / Build app (push) Has been cancelled
* Improve error message if restoring from JSON file

* Replace Exception with IOException

* Use more generic error message if protobuf fails

* fix lint
2024-07-31 20:39:41 +06:00
AntsyLich
c201b341a7
Cleanup backup/restore related code 2024-07-30 04:59:16 +06:00
AntsyLich
56fb4f62a1
Fix library is backed up when disabled and make categories backup/restore independent 2024-07-30 04:47:57 +06:00
Roshan Varughese
0af90999c8
Adds Option to Copy Panel to Clipboard (#1003)
Some checks failed
CI / Build app (push) Has been cancelled
* Add Copy to Clipboard

* Removing Unused Import

* Reusing onShare function

* Commit Suggestion

* Early Return on null

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-07-27 02:59:59 +06:00