pachli-android/core
Nik Clayton 442f3bc80c
feat: Show user's lists in the left-side navigation menu (#514)
Previously to view a list the user either had to add it to a tab, or tap
through "Lists" in the navigation menu to their list of lists, and then
tap the list they want.

Fix that, and show all their lists in a dedicated section in the menu,
with a new "Manage lists" entry that's functionality identical to the
old "Lists" entry (i.e., it shows their lists and allows them to create,
delete, and edit list settings).

To do that:

- Implement a proper `ListsRepository` as the single source of truth for
list implementation throughout the app. Expose the current list of lists
as a flow, with methods to perform operations on the lists.

- Collect the `ListsRepository` flow in `MainActivity` and use that to
populate the menu and update it whenever the user's lists change.

- Rewrite the activities and fragments that manipulate lists to use
`ListRepository`.

- Always show error snackbars when list operations fail. In particular,
the HTTP code and error are always shown.

- Delete the custom `Either` implementation, it's no longer used.

- Add types for modelling API responses and errors, `ApiResponse` and
`ApiError` respectively. The response includes the headers as well as
the body, so it can replace the use of `NetworkResult` and `Response`.
The actual result of the operation is expected to be carried in a
`com.github.michaelbull.result.Result` type. Implement a Retrofit call
adapter for these types.

Unit tests for these borrow heavily from
https://github.com/connyduck/networkresult-calladapter

Additional user-visible changes:

- Add an accessible "Refresh" menu item to `ListsActivity`.

- Adding a list to a tab has a dialog with a "Manage lists" option.
Previously that would close the dialog when clicked, so the user had to
re-open it on returning from list management. Now the dialog stays open.

- The soft keyboard automatically opens when creating or editing a list.
2024-03-10 23:14:21 +01:00
..
accounts fix: Ensure logging out accounts completes (#515) 2024-03-10 12:25:12 +01:00
activity fix: Show sized placeholder for hidden account media (#516) 2024-03-10 23:13:58 +01:00
common fix: Update InstanceV1/V2 related types based on real-world usage (#476) 2024-02-28 00:02:03 +01:00
data feat: Show user's lists in the left-side navigation menu (#514) 2024-03-10 23:14:21 +01:00
database test: close DB in TimelineDaoTest (#512) 2024-03-08 11:40:51 +01:00
designsystem fix: Show sized placeholder for hidden account media (#516) 2024-03-10 23:13:58 +01:00
navigation feat: Include "Notifications" in the left-side navigation menu (#504) 2024-03-05 14:45:28 +01:00
network feat: Show user's lists in the left-side navigation menu (#514) 2024-03-10 23:14:21 +01:00
preferences feat: Allow the user to trigger update checks (#458) 2024-02-20 14:50:59 +01:00
testing fix(deps): update agp to v8.3.0, lint to 31.3.0 (#483) 2024-03-01 23:07:14 +01:00
ui feat: Show information about notification fetches on "About" screen (#454) 2024-02-17 15:57:32 +01:00
AndroidManifest.xml refactor: Start creating core modules (#286) 2023-12-04 16:58:36 +01:00