pachli-android/app
Nik Clayton 9a23439d04
refactor: Remove duplicate strings from Filter contexts (#478)
A filter's context (previously referred to as its `kind`) controls where
the filter is applied.

This was implemented as an enum with a specific property to control how
it would serialise when @FormUrlEncoded, and with a @Json annotation for
Moshi.

In addition, the model objects kept the filter context in its string
form throughout Pachli, requiring periodic conversion to/from the enum
type, making the code more complicated.

Fix this, by:

1. Converting the incoming JSON value to the enum type immediately, so
the rest of the code uses the enum constants exclusively.

2. Implement a Retrofit converter that serialises the enum value when
@FormUrlEncoded to the same string used in JSON serialisation
2024-02-28 19:09:54 +01:00
..
src refactor: Remove duplicate strings from Filter contexts (#478) 2024-02-28 19:09:54 +01:00
build.gradle.kts chore: Prepare release 2.3.0 (versionCode 12) (#477) 2024-02-28 09:54:52 +01:00
gitTools.gradle ci: Upload orangeRelease to Google Play (internal track) (#134) 2023-09-28 13:50:02 +02:00
lint-baseline.xml fix: Show previews for playable audio media from accounts (#460) 2024-02-20 16:20:34 +01:00
lint.xml change: Disable SyntheticAccessor lint rule (#424) 2024-02-06 19:51:37 +01:00
proguard-rules.pro refactor: Convert from Gson to Moshi (#428) 2024-02-09 12:41:13 +01:00