Support the mastodon 4 filter api (#3188)

* Replace "warn"-filtered posts in timelines and thread view with placeholders

* Adapt hashtag muting interface

* Rework filter UI

* Add icon for account preferences

* Clean up UI

* WIP: Use chips instead of a list. Adjust padding

* Scroll the filter edit activity

Nested scrolling views (e.g., an activity that scrolls with an embedded list
that also scrolls) can be difficult UI.

Since the list of contexts is fixed, replace it with a fixed collection of
switches, so there's no need to scroll the list.

Since the list of actions is only two (warn, hide), and are mutually
exclusive, replace the spinner with two radio buttons.

Use the accent colour and title styles on the different heading titles in
the layout, to match the presentation in Preferences.

Add an explicit "Cancel" button.

The layout is a straightforward LinearLayout, so use that instead of
ConstraintLayout, and remove some unncessary IDs.

Update EditFilterActivity to handle the new layout.

* Cleanup

* Add more information to the filter list view

* First pass on code review comments

* Add view model to filters activity

* Add view model to edit filters activity

* Only use the status wrapper for filtered statuses

* Relint

---------

Co-authored-by: Nik Clayton <nik@ngo.org.uk>
This commit is contained in:
Levi Bard 2023-03-11 13:12:50 +01:00 committed by GitHub
commit ff8dd37855
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 2770 additions and 631 deletions

View file

@ -246,8 +246,8 @@
<string name="replying_to">Antworten an @%s</string>
<string name="load_more_placeholder_text">mehr laden</string>
<string name="pref_title_thread_filter_keywords">Konversationen</string>
<string name="filter_addition_dialog_title">Filter hinzufügen</string>
<string name="filter_edit_dialog_title">Filter bearbeiten</string>
<string name="filter_addition_title">Filter hinzufügen</string>
<string name="filter_edit_title">Filter bearbeiten</string>
<string name="filter_dialog_remove_button">Entfernen</string>
<string name="filter_dialog_update_button">Aktualisieren</string>
<string name="add_account_name">Konto hinzufügen</string>