7094 Commits

Author SHA1 Message Date
MajorTanya
badc229a23
Fix Bangumi login regression (#1770)
Caused by #1748.

Two different issues actually.

Firstly, the getUsername API call uses the authClient, which uses the
BangumiInterceptor to get the current OAuth data and attach the
Authorization header. However, on login, #1748 did not try to set the
new auth details until after attempting to call getUsername.
This would cause Mihon to think the user was not authenticated with
Bangumi and cancel the process.

This is fixed by having Mihon store the OAuth credentials in the
interceptor first before attempting to call getUsername.

The second issue is a simple trailing dollar sign in the API URL for
the getUsername method. This was removed.
2025-02-25 11:38:33 +06:00
MajorTanya
277d8bad8e
Add back explicit update(track) call to Bangumi (#1771)
Most if not all other trackers do this too. Technically this causes
some request duplication (since things like the BaseTracker's
setRemoteLastChapterRead fire anyway due to the tracker sheet being
open. But considering the reduced number of requests in other places,
I think this is still acceptable.

This change will allow #1736 to proceed, hopefully.
2025-02-25 11:37:23 +06:00
MajorTanya
8b48d1016b
Add "Monochrome" theme (#1752)
This theme is mainly geared towards e-Ink displays with limited/no
colour capabilities. Previous themes like Yin & Yang would make heavy
use of greyscale colours which could look off on some devices.

This theme is probably not conformant to Material Design 3 colour
scheme guidelines, but it does boast some amazing WebAIM contrast
ratios (#FFFFFF text on #000000 background gets a ratio of 21:1, vice
versa too).

Initially, this was intended as a purely black and white theme but
some contrast issues arose, such as the download badges (tertiary
background, onTertiary text colour) having the same colour as unread
badges (primary/onPrimary), or the step indicators (stops) not being
visible on sliders (since they use the colours of the opposite state
track (active region stops are the colour of the inactive region track
and vice versa).

To mitigate this, each variant (dark/light) of the theme has one
additional grey mixed in for their tertiary and secondaryContainer
colours each. For the dark variant, this is a #A0A0A0 background for
#000000 text (8.03:1 contrast ratio) and for the light variant, it is
a #505050 background for #FFFFFF text (8.06:1 contrast ratio).
This results in distinct unread vs download badges and visible steps
in the sliders.

---------

Co-authored-by: Sunspark-007 <73711243+Sunspark-007@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-02-25 05:22:48 +06:00
MajorTanya
a96fbba3dc
Migrate to Bangumi's newer v0 API (#1748)
This comes with many benefits:
- Starting dates are now available and shown to users
- Lays groundwork to add private tracking for Bangumi, e.g. in #1736
- Mihon makes approximately 2-4 times fewer calls to Bangumi's API
- Simplified interceptor for the access token addition
  - v0 does not allow access tokens in the query string
- There is actively maintained documentation for it

Also shrunk the DTOs for Bangumi by removing attributes we have no
use for either now or in the foreseeable future. Volume data remains
in case Mihon wants to ever support volumes. But attributes such as
user avatars, nicknames, data relating to Bangumi's tag & meta-tag
systems, etc. have been removed or just not added to the DTOs.
2025-02-24 23:21:22 +00:00
Mend Renovate
d8a530266f
Update dependency androidx.compose:compose-bom to v2025 (#1651) 2025-02-25 05:20:31 +06:00
Cuong-Tran
e1724d1aa0
Fix backup/restore of category related preferences (#1726)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-02-24 22:04:39 +00:00
AntsyLich
1a5b4c2804
Format CHANGELOG.md 2025-02-25 03:43:52 +06:00
Cuong-Tran
2cd52d5a1f
Reuse AppBar in manga screen (#1367)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-02-25 03:33:47 +06:00
AntsyLich
ebfbbf0741
Cleanup and tweak preference widgets (#1769) 2025-02-24 20:19:25 +00:00
Cuong-Tran
eeb683069a
Fix App's preferences referencing deleted categories (#1734) 2025-02-25 00:44:28 +06:00
Roshan Varughese
7e71a34256
Add button to favorite manga from history screen (#1733) 2025-02-24 22:20:20 +06:00
NGB-Was-Taken
29ee53f461
Apply "Downloaded only" filter to all entries regardless of favourite status (#1603)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-02-24 22:08:09 +06:00
Mend Renovate
6a223f34a0
Update aboutlib.version to v11.6.3 (#1737) 2025-02-23 22:47:31 +06:00
Mend Renovate
c335ea9103
Update actions/upload-artifact action to v4.6.1 (#1756) 2025-02-23 22:45:59 +06:00
BrutuZ
c97fe71e29
Ignore hidden files/folders for Local Source chapter list (#1763) 2025-02-23 10:55:03 +06:00
Mend Renovate
8e81a5e68b
Update aboutlib.version to v11.6.0 (#1728) 2025-02-16 01:52:34 +06:00
Mend Renovate
b08270d523
Update plugin firebase-crashlytics to v3.0.3 (#1702) 2025-02-15 20:26:33 +06:00
AntsyLich
34d1e6fa27
Add more editor configs and move ktlint config to it (#1731) 2025-02-15 13:51:10 +00:00
Mend Renovate
a80965f7f1
Update dependency com.android.tools.build:gradle to v8.8.1 (#1723) 2025-02-14 02:44:55 +06:00
Mend Renovate
59ee61039b
Update paging.version to v3.3.6 (#1717) 2025-02-14 02:41:42 +06:00
Mend Renovate
b7a96e6946
Update dependency io.coil-kt.coil3:coil-bom to v3.1.0 (#1701) 2025-02-14 02:37:21 +06:00
Mend Renovate
31a3f9e051
Update moko to v0.24.5 (#1694) 2025-02-14 02:37:00 +06:00
Mend Renovate
42e45e6020
Update GitHub Actions (#1677) 2025-02-14 02:35:21 +06:00
AntsyLich
e8c9cb2c2e
Rework slider UI
Fixes #1474
2025-02-05 23:37:30 +06:00
Mend Renovate
d592ab2e87
Update aboutlib.version to v11.5.0 (#1663) 2025-02-02 21:56:00 +06:00
Mend Renovate
9d6ed93daa
Update dependency gradle to v8.12.1 (#1662) 2025-02-02 21:55:41 +06:00
Mend Renovate
34efa8d901
Update kotlin monorepo to v2.1.10 (#1671) 2025-02-02 21:55:27 +06:00
MajorTanya
bfc8320aa4
Add Infinix system app to list of invalid browsers (#1684)
* Add Infinix system app to list of invalid browsers

`com.transsion.resolver` being picked by the system as a suitable
browser caused a Mihon user with an Infinix device to be unable to
open any links in browsers, including tracker login and opening a
WebView page in a real browser.

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

* Add docstring to DeviceUtil.invalidDefaultBrowsers

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-02-02 21:54:55 +06:00
MajorTanya
29ec7c125a
Fix MAL tracker losing track of login expiration (#1682)
* Add missing @EncodeDefault annotation to MALOAuth

Similar to the situation with Bangumi, the missing annotation means
kotlinx.serialization would _provide_ the default value upon
instantiation but not serialise it to disk. This means the isExpired()
calculation would effectively rarely/never do its job correctly,
leading to Mihon sending expired tokens to MAL and causing problems
for everyone involved.

Overall, this change _could_ (should) lead to a drastic reduction in
MAL requests failing, leading to users having to relink their MAL
accounts.

Also switched createdAt to be in seconds instead of milliseconds as
all other trackers use seconds for timestamps (except for AniList,
which uses milliseconds but doesn't use a createdAt timestamp anyway).

* Add CHANGELOG.md entry
2025-01-30 15:43:37 +00:00
MajorTanya
dce6aacf02
Fix Bangumi tracker losing track of login expiration (#1681)
* Fix Bangumi tracking losing track of login state

kotlinx.serialization does NOT serialize default values (like
createdAt in BGMOAuth.kt), so every time the Bangumi tracker
deserialized the tracker OAuth, createdAt was set to the time of the
read, not the time of issuance.

Separately, BangumiInterceptor did correctly fetch new OAuth
credentials upon detected expiry of the stored credentials and saved
them, but did not use them for the current request (the new
credentials were used for all subsequent requests only). This led to
401 errors from Bangumi because the expired access_token was provided.
 A subsequent request using the newly acquired access_token would end
 up being successful.

* Add CHANGELOG.md entry
2025-01-30 21:29:03 +06:00
MajorTanya
503d0be667
Add zoned "Current time" to debug info and include year & timezone in logcat output (#1672)
* Add zoned date & time to debug info & logs

This should help distinguish log entries that happened recently and
may be related to crashes from older entries that occurred before now.

* Change logcat date and time output format

After some discussion, it was decided to adjust the logcat date and
time display to include the year and the timezone in the logcat
output. This results in a line start like this:

`2025-01-27 18:37:46.662 +0100`

which follows the following DateTimeFormatter pattern:

`yyyy-MM-dd HH:mm:ss.SSS Z`

* Add CHANGELOG.md entry
2025-01-28 15:53:26 +06:00
Mend Renovate
82fd89cee6
Update dependency com.google.firebase:firebase-bom to v33.8.0 (#1652) 2025-01-21 21:39:44 +06:00
Mend Renovate
643f95f046
Update dependency androidx.recyclerview:recyclerview to v1.4.0 (#1650) 2025-01-21 21:33:14 +06:00
Mend Renovate
9c81f2486c
Update dependency androidx.activity:activity-compose to v1.10.0 (#1649) 2025-01-21 21:32:08 +06:00
Mend Renovate
e59d2d381d
Update dependency com.diffplug.spotless:spotless-plugin-gradle to v7.0.2 (#1647) 2025-01-21 21:30:34 +06:00
AntsyLich
da90064c94
Remove unnecessary filters for pseudolocales 2025-01-21 09:01:32 +06:00
AntsyLich
d53a3828b1
Address some deprecations 2025-01-21 08:55:34 +06:00
sdaqo
c283abefb0
Add option to enable incognito mode per extension (#157)
* add per Extension Incognito Mode

* migrate incognito sources when extension is updated

* remove incognito sources when extension is uninstalled

* remove not used variable

* address change requests

address change requests

* Rebase and cleanup code

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-01-12 09:38:05 +06:00
Mend Renovate
4bc593861c
Update GitHub Actions (#1632) 2025-01-12 05:01:17 +06:00
Mend Renovate
5a9367603b
Update dependency com.diffplug.spotless:spotless-plugin-gradle to v7.0.1 (#1630) 2025-01-12 05:00:59 +06:00
Mend Renovate
c01e9f3e92
Update dependency com.squareup.okio:okio to v3.10.2 (#1631) 2025-01-12 05:00:42 +06:00
Mend Renovate
ae9753a1ea
Update dependency com.android.tools.build:gradle to v8.8.0 (#1634) 2025-01-12 05:00:27 +06:00
Mend Renovate
1fe4d6cbd4
Update dependency io.mockk:mockk to v1.13.16 (#1636) 2025-01-12 05:00:11 +06:00
AntsyLich
2c5f28f277
[skip ci] Use Adoptium distributed Java in workflows 2025-01-10 05:00:42 +06:00
Mend Renovate
3a3abc6854
Update dependency com.diffplug.spotless:spotless-plugin-gradle to v7.0.0 (#1628) 2025-01-07 16:35:21 +06:00
Mend Renovate
d9a550b935
Update serialization.version to v1.8.0 (#1627) 2025-01-07 16:35:09 +06:00
Mend Renovate
1617f8eb49
Update aboutlib.version to v11.4.0 (#1621) 2025-01-07 16:34:39 +06:00
AntsyLich
77faab14b1
Tweak build workflows 2025-01-07 14:33:08 +06:00
MajorTanya
d60802721b
Fix MAL main_picture nullability breaking search if a result doesn't have a cover set (#1618)
* Fix MAL manga cover nullability

If a manga doesn't have a cover, MAL doesn't provide the
`main_picture` element in the API response at all.

* Add CHANGELOG.md entry
2025-01-04 04:19:11 +06:00
Mend Renovate
19af85ab61
Update GitHub Actions (#1561)
* Update GitHub Actions

* Downgrade softprops/action-gh-release

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-01-02 15:25:04 +06:00