mirror of
https://github.com/pachli/pachli-android.git
synced 2025-01-31 17:44:51 +01:00
e009c00a76
Allow the user to define filtering rules for notifications by sending account: - Not followed - Younger than 30d - Limited by moderators and a policy for each of either show, warn, or hide. To do this: ## Manage followers - Create a new `FollowingAccountEntity`, to record accounts the logged in account is following. - Fetch the account's followers when an account is made active, and persist to this table. - Provide the followers as a property on `PachliAccount` - Update this table if the user follows/unfollows accounts during normal operation. ## Track account creation time - Record account creation time in `TimelineAccount`. ## Track notification creation time - Record notification creation time in `Notification`. ## API - Always fetch all notifications, including those the server is filtering. ## UX and storage for account filters - Show a new Account preference to edit account notification filters. - Display a dialog to manage account notification filters. - Persist the user's choice to new properties in `AccountEntity`. - New `AccountManager` methods to update the properties ## Filtering notifications - New `NotificationFilter.filterNotificationByAccount()` method to make the filtering decision based on the user's preferences. - Use this in `NotificationFetcher` to filter notifications before creating Android notifications. - Use this in `NotificationsViewModel` to filter notifications before display in `NotificationsFragment`. ## UX for filtered notifications - Display filtered (with warning) notifications inline with other notifications, with UI to disclose the notification or edit the filters.