Commit graph

6912 commits

Author SHA1 Message Date
Secozzi
ca61d71abf
Fix sporadically recurring spotless CI failure
Somehow this specific issue keeps getting flagged by unrelated PRs'
CI runs (but only sometimes? Somehow? Other times the CI run would
succeed with no spotless issues.)

---------

Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-31 12:44:10 +01:00
Secozzi
111db99aff
Here lies "currentTab was used multiple times"
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-31 12:42:05 +01:00
Secozzi
9863bdc631
Release v0.17.0 (a.k.a. bump versionCode)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-31 12:07:30 +01:00
Secozzi
e7714533b1
Fix app crash when removing tracked entry from tracker
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
2024-10-31 12:05:58 +01:00
Secozzi
38955686fd
Allow completely disabling "Update tracker" snackbar on mark as read
Co-authored-by: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com>
2024-10-31 12:04:37 +01:00
Secozzi
5cdaf753cd
Update dependency com.pinterest.ktlint:ktlint-cli to v1.4.0
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
2024-10-31 11:56:54 +01:00
AntsyLich
e74f838b10
Cleanup Slider usage
(cherry picked from commit df9fff60da3a38acd8fcd540b5fdd275be93f2d5)
2024-10-31 11:50:36 +01:00
Secozzi
57b897ec05
Avoid blocking call to load categories in settings
Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
2024-10-31 11:49:58 +01:00
Secozzi
7303c4c50d
Rework Auto Track on Mark as Read
Co-authored-by: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com>
2024-10-31 11:47:14 +01:00
AntsyLich
51120559db
Pass uncaught exception to default handler in GlobalExceptionHandler
Fixes #1347

(cherry picked from commit f3a2f566c8a09ab862758ae69b43da2a2cd8f1db)
2024-10-31 11:25:56 +01:00
Secozzi
3c2ba19c76
Address deprecation, suggestion and spotless
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-31 11:25:11 +01:00
Secozzi
e496c73e9c
Change "Invalidate downloads index" to "Reindex downloads"
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-31 11:22:42 +01:00
Secozzi
6c11d06e04
Make sure random library sort is at the bottom
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-31 11:10:21 +01:00
Secozzi
c91ddaf2cf
Reorder reader menu overflow items
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-31 11:05:59 +01:00
AntsyLich
cda43b7645
Cleanup .gitignore files
(cherry picked from commit afa50029882655af8d5eea40aed7644fce4564d8)
2024-10-31 11:03:02 +01:00
Secozzi
f25f6b3e29
Add option to backup non-library read entries
Co-authored-by: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com>
Co-authored-by: jobobby04 <jobobby04@gmail.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-31 11:00:50 +01:00
Secozzi
53f0f6358e
Fix EnhancedTracker not auto binding when adding manga to library
Co-authored-by: brewkunz <102181083+brewkunz@users.noreply.github.com>
2024-10-31 10:32:41 +01:00
Secozzi
36e0ec4417
Confirmation dialog when removing privately installed extensions
Co-authored-by: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 21:36:27 +01:00
Secozzi
cd4c19585d
Added random library sort
Co-authored-by: Jack Hamilton <4615800+jackhamilton@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 21:25:16 +01:00
Secozzi
0f4a190ff0
Add Quantity Badge to Upcoming Screen
Co-authored-by: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 21:09:34 +01:00
Secozzi
4f1126df19
Tweak profile compilation status output
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 20:58:20 +01:00
Secozzi
23164d9655
run spotlessApply 2024-10-30 20:58:07 +01:00
Secozzi
5d541359f0
Remove usage of deprecated accompanist SystemUiController
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 20:55:13 +01:00
Secozzi
f077bd5340
ChapterNavigator: dispatch page change only when needed
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 20:37:45 +01:00
Secozzi
ba61019280
Bump compile sdk to 35
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 20:36:34 +01:00
AntsyLich
cd5cef4814
Update resources exclusion rules
Co-authored-by: p
(cherry picked from commit 481cfedf08576cecfbb35616837bd8f627d8f959)
2024-10-30 19:29:58 +01:00
Secozzi
7a7582914c
run spotlessApply 2024-10-30 19:09:44 +01:00
Secozzi
512fb60967
Cleanup LibraryScreenModel LibraryMap.applySort and some more
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 19:09:32 +01:00
Secozzi
94d67bf930
Retain remote last chapter read if it's higher than the local one for EnhancedTracker
Co-authored-by: brewkunz <102181083+brewkunz@users.noreply.github.com>
2024-10-30 18:59:34 +01:00
Secozzi
69a8b512a5
Fix AniList ALSearchItem.status nullibility 2024-10-30 18:56:44 +01:00
Secozzi
f87a59a512
Re-enable fetching chapters list for entries with licenced status
Enable Licensed

Co-authored-by: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com>
2024-10-30 18:51:10 +01:00
Secozzi
34deae5e27
Fix Kitsu synopsis nullability
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.

Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
2024-10-30 12:21:59 +01:00
NGB-Was-Taken
687a0d98da
Show toast for app restart when User-Agent is changed (#1204)
(cherry picked from commit c8ad6cdf31a14bce9a525cfc2a0616e8ac51d7c3)
2024-10-30 12:17:03 +01:00
Secozzi
8a3e3dd55b
Reduce ChapterNavigator horizontal padding on small ui
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 12:16:32 +01:00
Secozzi
415fa7681d
Use TextFieldState in BasicTextField where applicable
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 12:14:07 +01:00
Secozzi
3d3069c77e
Ignore "intent://" urls on webview
ignore intent urls

Co-authored-by: bapeey <90949336+bapeey@users.noreply.github.com>
2024-10-30 11:59:31 +01:00
Secozzi
202eaf4f49
Fix moving of openFileDescriptor 2024-10-30 11:56:32 +01:00
Secozzi
341c53af96
Merge remote-tracking branch 'origin/master' into mihonmerge
# Conflicts:
#	i18n/src/commonMain/moko-resources/ar/strings.xml
#	i18n/src/commonMain/moko-resources/as/strings.xml
#	i18n/src/commonMain/moko-resources/it/strings.xml
#	i18n/src/commonMain/moko-resources/ja/strings.xml
#	i18n/src/commonMain/moko-resources/pl/strings.xml
#	i18n/src/commonMain/moko-resources/vi/strings.xml
#	i18n/src/commonMain/moko-resources/zh-rCN/strings.xml
2024-10-30 11:44:29 +01:00
AntsyLich
a095952e0f
Use new library for injekt with inorichi patch
(cherry picked from commit c929854ae9)
2024-10-30 11:42:54 +01:00
AntsyLich
3599a38ad6
Move archive related code to :core:archive
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 11:42:29 +01:00
Secozzi
443de1f8bd
Fix Kitsu ratingTwenty being typed as String
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.

Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
2024-10-29 23:10:14 +01:00
Secozzi
32ce7e4407
Migrate some classpaths to gradle plugins
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-29 23:07:16 +01:00
Secozzi
67af9a79ba
Option to update trackers when chapter marked as read
* 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: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-29 22:56:38 +01:00
Secozzi
f9b3c7c77a
Use DTOs to parse tracking API responses
* 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

Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
2024-10-29 22:46:31 +01:00
Secozzi
d58e121fa3
spotlessApply my beloved 2024-10-28 11:59:32 +01:00
Secozzi
dd17832428
Add stable marker to Manga data class
Co-authored-by: ivan <12537387+ivaniskandar@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-28 11:57:58 +01:00
Secozzi
2abb7be491
Collect MangaScreen state with lifecycle
Co-authored-by: ivan <12537387+ivaniskandar@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-28 11:44:25 +01:00
Secozzi
10882a5f84
PagerPageHolder: lazy init loading indicator
Co-authored-by: ivan <12537387+ivaniskandar@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-28 11:39:23 +01:00
Secozzi
c27bf3f6b1
Remove legacy broken source and history backup
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-28 11:33:19 +01:00
Secozzi
a3da190a23
Hide keyboard when a Tracker SearchResultItem is clicked
* Hide keyboard on select

* Code Review Suggestion

Co-authored-by: Roshan Varughese <40583749+Animeboynz@users.noreply.github.com>
2024-10-28 11:25:30 +01:00