Refactor notifications to Kotlin & paging (#4026)

This refactors the NotificationsFragment and related classes to Kotlin &
paging.
While trying to preserve as much of the original behavior as possible,
this adds the following improvements as well:
- The "show notifications filter" preference was added again
- The "load more" button now has a background ripple effect when clicked
- The "legal" report category of Mastodon 4.2 is now supported in report
notifications
- Unknown notifications now display "unknown notification type" instead
of an empty line

Other code quality improvements:
- All views from xml layouts are now referenced via ViewBindings
- the classes responsible for showing system notifications were moved to
a new package `systemnotifications` while the classes from this
refactoring are in `notifications`
- the id of the local Tusky account is now called `tuskyAccountId` in
all places I could find

closes https://github.com/tuskyapp/Tusky/issues/3429

---------

Co-authored-by: Zongle Wang <wangzongler@gmail.com>
This commit is contained in:
Konrad Pozniak 2024-05-03 18:27:10 +02:00 committed by GitHub
commit b2c0b18c8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
121 changed files with 6992 additions and 4654 deletions

View file

@ -686,7 +686,7 @@
<string name="pref_title_enable_swipe_for_tabs">Enable swipe gesture to switch between tabs</string>
<string name="pref_title_show_stat_inline">Show post statistics in timeline</string>
<string name="pref_title_show_notifications_filter">Show Notifications filter</string>
<string name="create_poll_title">Poll</string>
<string name="label_duration">Duration</string>
@ -718,7 +718,6 @@
<string name="warning_scheduling_interval">Mastodon has a minimum scheduling interval of 5 minutes.</string>
<string name="pref_title_show_self_username">Show username in toolbars</string>
<string name="pref_title_show_cards_in_timelines">Show link previews in timelines</string>
<string name="pref_title_show_notifications_filter">Show Notifications filter</string>
<string name="pref_title_confirm_reblogs">Show confirmation before boosting</string>
<string name="pref_title_confirm_favourites">Show confirmation before favoriting</string>
<string name="pref_title_hide_top_toolbar">Hide the title of the top toolbar</string>
@ -770,6 +769,7 @@
<string name="report_category_violation">Rule violation</string>
<string name="report_category_spam">Spam</string>
<string name="report_category_legal">Legal</string>
<string name="report_category_other">Other</string>
<string name="action_unfollow_hashtag_format">Unfollow #%1$s?</string>
@ -847,8 +847,11 @@
<string name="dialog_delete_filter_text">Delete filter \'%1$s\'?"</string>
<string name="dialog_delete_filter_positive_action">Delete</string>
<string name="dialog_save_profile_changes_message">Do you want to save your profile changes?</string>
<string name="list_reply_policy_none">No one</string>
<string name="list_reply_policy_list">Members of the list</string>
<string name="list_reply_policy_followed">Any followed user</string>
<string name="list_reply_policy_label">Show replies to</string>
<string name="unknown_notification_type">Unknown notification type</string>
</resources>