pachli-android/core/network
Nik Clayton 362cdfeb27
fix: Prevent crash when Pachli is a share target (#659)
Crash was occuring because the instance info hadn't been fetched, trying
to take the last item of an empty list.

To fix:

- Expose the instance info as a state flow, with a default. New instance
info is fetched whenever the active account changes.

- Do the same for the emojis supported by the server.

- Update call sites as appropriate.

- Mark `InstanceInfoRepository` as `@Singleton` so it isn't repeatedly
created causing fresh content fetches.

The tests needed updating to get this to work.

- Extract the network fake modules in to a network-test module so
multiple other modules can use them.

- Rewrite `InstanceInfoRepositoryTest` to use Hilt and use Turbine to
test the new flows.

Checking this showed cosmetic bugs in the About layout when instance
info is missing, clean those up.
2024-04-28 18:19:13 +02:00
..
src feat: Update activity transitions, prepare for predictive-back (#650) 2024-04-26 23:18:30 +02:00
build.gradle.kts fix: Prevent crash when Pachli is a share target (#659) 2024-04-28 18:19:13 +02:00
lint-baseline.xml fix(deps): update agp to v8.3.0, lint to 31.3.0 (#483) 2024-03-01 23:07:14 +01:00
proguard-rules.pro refactor: Start creating core modules (#286) 2023-12-04 16:58:36 +01:00