pachli-android/core/data
Nik Clayton e009c00a76
feat: Initial support for filtering notifications by sending account (#1127)
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.
2024-11-25 11:35:05 +01:00
..
src feat: Initial support for filtering notifications by sending account (#1127) 2024-11-25 11:35:05 +01:00
build.gradle.kts refactor: Ongoing work to remove the `activeAccount` idiom (#964) 2024-11-13 11:45:16 +01:00
lint-baseline.xml refactor: Ongoing work to remove the `activeAccount` idiom (#964) 2024-11-13 11:45:16 +01:00