Poll notifications (#1229)

* show poll notifications in the app

* show poll notifications in the app

* allow filtering poll notifications in the poll fragment

* show poll notifications in system notifications
This commit is contained in:
Konrad Pozniak 2019-05-02 19:44:35 +02:00 committed by GitHub
commit e735e4843e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 1076 additions and 318 deletions

View file

@ -222,7 +222,8 @@ public class NotificationsFragment extends SFragment implements
recyclerView.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
adapter = new NotificationsAdapter(dataSource, this, this);
adapter = new NotificationsAdapter(accountManager.getActiveAccount().getAccountId(),
dataSource, this, this);
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
alwaysShowSensitiveMedia = accountManager.getActiveAccount().getAlwaysShowSensitiveMedia();
boolean mediaPreviewEnabled = accountManager.getActiveAccount().getMediaPreviewEnabled();
@ -652,13 +653,15 @@ public class NotificationsFragment extends SFragment implements
private String getNotificationText(Notification.Type type) {
switch (type) {
case MENTION:
return getString(R.string.filter_mentions);
return getString(R.string.notification_mention_name);
case FAVOURITE:
return getString(R.string.filter_favorites);
return getString(R.string.notification_favourite_name);
case REBLOG:
return getString(R.string.filter_boosts);
return getString(R.string.notification_boost_name);
case FOLLOW:
return getString(R.string.filter_follows);
return getString(R.string.notification_follow_name);
case POLL:
return getString(R.string.notification_poll_name);
default:
return "Unknown";
}