Commit Graph

6052 Commits

Author SHA1 Message Date
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
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
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
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
ebfbbf0741 Cleanup and tweak preference widgets (#1769) 2025-02-24 20:19:25 +00:00
eeb683069a Fix App's preferences referencing deleted categories (#1734) 2025-02-25 00:44:28 +06:00
7e71a34256 Add button to favorite manga from history screen (#1733) 2025-02-24 22:20:20 +06:00
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
e8c9cb2c2e Rework slider UI
Fixes #1474
2025-02-05 23:37:30 +06:00
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
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
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
da90064c94 Remove unnecessary filters for pseudolocales 2025-01-21 09:01:32 +06:00
d53a3828b1 Address some deprecations 2025-01-21 08:55:34 +06:00
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
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
c5655e8803 Revert "Revert "Add option to always use SSIV for image decoding""
This reverts commit 1909126921
2024-12-22 02:38:12 +06:00
3a100c7816 Release v0.17.1 2024-12-06 23:12:20 +06:00
7f2cfb5eb2 Always use software bitmap on certain devices (#1543)
* Include Coil's broken hardware bitmap device list

Declares all listed devices as unable to use hardware bitmaps.

Might fix #1541.

* Hide Hardware Bitmap Threshold setting if unusable

This hides the setting from the UI if the user's device in on Coil's
list of devices with problematic hardware bitmap implementations.

Also moved HARDWARE_BITMAP_UNSUPPORTED into the ImageUtil as a
property for more ergonomic access across the project.

* Add missing negation

* Update CHANGELOG.md

* Update CHANGELOG.md

* Needs to be and not or

Also fix typo in CHANGELOG.md

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-12-06 21:14:18 +06:00
d6dfd24548 Improve hardware bitmap threshold option
Also `spotlessApply`
2024-11-21 07:14:18 +06:00
88aff2c77f Fix app update error notification disappearing (#1476) 2024-11-20 20:07:34 +06:00
81effea01c Slightly tweak Preference.PreferenceItem.CustomPreference 2024-11-20 17:54:30 +06:00
9aef08c333 Fix loading screen not appearing when changing query in browser screen
Fixes #1438
Closes #1441
2024-11-20 17:54:30 +06:00
dcddac5daa Add option to lower the threshold for hardware bitmaps
Closes #1436
Closes #1486
2024-11-20 17:54:29 +06:00
e6d96bd348 Switch to hardware bitmap in reader only if device can handle it
Closes #1460
2024-11-20 17:18:32 +06:00
1909126921 Revert "Add option to always use SSIV for image decoding"
This reverts commit bb4d9fc81a.
2024-11-17 02:51:48 +06:00
36d5ee0763 Fix reader transition color scheme in auto background mode (#1487) 2024-11-17 02:30:48 +06:00
9df21583dc Fix crash after removing last category while it's active in library (#1450) 2024-11-07 20:20:27 +06:00
57e6e198b8 Update dependency androidx.work:work-runtime to v2.10.0 2024-11-07 20:07:46 +06:00
2f4bb7cadb Cleanup some code 2024-11-02 21:28:43 +06:00
bb4d9fc81a Add option to always use SSIV for image decoding 2024-11-02 21:24:27 +06:00
a1c6089791 Address some build warnings and cleanup (#1412) 2024-10-31 20:17:27 +06:00
06efc3b25c Fix long strip images not loading in some old devices
Fixes #1398
2024-10-31 19:19:32 +06:00
f508d10ad1 Fix a rare crash when invoking "Mark previous as read" action
Closes #1421
2024-10-31 19:19:24 +06:00
78f9a84b14 Some improvements to Bangumi tracker search (#1396)
In short:
- fetch & show actual summary
- fallback to "name" if "name_cn" is empty
- request larger responseGroup to get & display the summary & rating
- add type filter query param to make Bangumi filter, not us

Previously, we only displayed the "name" in the summary area and used
"name_cn" as the entry name. However, "name_cn" (Chinese name) can be
an empty string at times, resulting in an awkward looking search
result list where some, many, or even all the results have no title
displayed and only show the "name" (Japanese name) in the summary
area. This has been solved by using "name" as a fallback value should
"name_cn" be empty.

If a Chinese name is available, the original name is prepended to the
summary with the addition "作品原名:" (meaning "original series title").

By using the "responseGroup=large" query parameter, we can request
the required data we need to display the actual summary for an entry
and the entry's average rating.
The "name" is prepended to the summary contents, if any exist, so it
is still accessible for series identification if a "name_cn" exists
too and was used for the result title.

Adding the "type=1" filter query parameter means Bangumi will only
return entries of type 1 ("book") instead of all types and Mihon
needing to filter, resulting in potentially missed entry matches.
2024-10-31 01:52:18 +06:00
ed9e13a365 Fix sporadically recurring spotless CI failure (#1407)
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: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-10-30 13:48:52 +00:00
371c1432e2 Here lies "currentTab was used multiple times"
Fixes #282
2024-10-29 21:46:07 +06:00
38d5fc9160 Release v0.17.0 2024-10-26 23:37:41 +06:00
6de06419f8 Fix app crash when removing tracked entry from tracker (#1380) 2024-10-26 20:12:34 +06:00
fc2f339ea1 Allow completely disabling "Update tracker" snackbar on mark as read (#1374)
Also fixes #1369
2024-10-26 19:16:39 +06:00
140083ee39 Update dependency com.pinterest.ktlint:ktlint-cli to v1.4.0
Co-authored-by: Mend Renovate <bot@renovateapp.com>
2024-10-26 07:40:57 +06:00
df9fff60da Cleanup Slider usage 2024-10-26 07:15:01 +06:00
f7752a98b2 Avoid blocking call to load categories in settings (#1364) 2024-10-24 23:51:47 +06:00
c153ac01f5 Rework Auto Track on Mark as Read (#1365) 2024-10-24 12:23:28 +00:00
f3a2f566c8 Pass uncaught exception to default handler in GlobalExceptionHandler
Fixes #1347
2024-10-19 22:51:01 +06:00
15e3f28aa3 Rework Firebase setup
Fixes #1332
Closes #1339
2024-10-19 21:22:04 +06:00
3bf70b230f Address deprecation, suggestion and spotless 2024-10-19 20:19:06 +06:00
d2afbfe4ed Change "Invalidate downloads index" to "Reindex downloads" 2024-10-19 17:06:29 +06:00
2e2c8d36c1 Make sure random library sort is at the bottom 2024-10-15 05:00:56 +06:00
788235feec Reorder reader menu overflow items 2024-10-15 03:57:58 +06:00