Notification bell (#2012)

* Add notification bell button, API endpoints and new relationship field

* Add notification type for subscriptions

* Add subscriptions to legacy notification filtering

* Update schemas

* Fix build

* Make rewrite static method into method of Notification class, fix getNotificationText

* Mastodon wording for subscriptions
This commit is contained in:
Alibek Omarov 2020-12-23 14:52:39 +03:00 committed by GitHub
commit b91a0aceeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 970 additions and 33 deletions

View file

@ -179,7 +179,9 @@ public class NotificationsFragment extends SFragment implements
@Override
public NotificationViewData apply(Either<Placeholder, Notification> input) {
if (input.isRight()) {
Notification notification = input.asRight();
Notification notification = input.asRight()
.rewriteToStatusTypeIfNeeded(accountManager.getActiveAccount().getAccountId());
return ViewDataUtils.notificationToViewData(
notification,
alwaysShowSensitiveMedia,
@ -770,6 +772,8 @@ public class NotificationsFragment extends SFragment implements
return getString(R.string.notification_follow_request_name);
case POLL:
return getString(R.string.notification_poll_name);
case STATUS:
return getString(R.string.notification_subscription_name);
default:
return "Unknown";
}