diff --git a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java
index 4daa24f23..c07e4bf77 100644
--- a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java
+++ b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java
@@ -199,14 +199,21 @@ public class PushNotificationReceiver extends BroadcastReceiver{
}
+ if (notification != null) {
switch (pn.notificationType) {
case MENTION -> {
- builder.addAction(buildNotificationAction(context, accountID, notification, context.getString(R.string.sk_notification_action_favorite), NotificationAction.FAVORITE));
- builder.addAction(buildNotificationAction(context, accountID, notification, context.getString(R.string.sk_notification_action_bookmark), NotificationAction.BOOKMARK));
- if (notification != null && notification.status.visibility != StatusPrivacy.DIRECT)
- builder.addAction(buildNotificationAction(context, accountID, notification, context.getString(R.string.sk_notification_action_boost), NotificationAction.REBLOG));
+ if(!notification.status.favourited)
+ builder.addAction(buildNotificationAction(context, accountID, notification, context.getString(R.string.sk_notification_action_favorite), NotificationAction.FAVORITE));
+ if(!notification.status.bookmarked)
+ builder.addAction(buildNotificationAction(context, accountID, notification, context.getString(R.string.sk_notification_action_bookmark), NotificationAction.BOOKMARK));
+ if(notification.status.visibility != StatusPrivacy.DIRECT)
+ builder.addAction(buildNotificationAction(context, accountID, notification, context.getString(R.string.sk_notification_action_boost), NotificationAction.REBLOG));
}
-// case FOLLOW -> builder.addAction(buildNotificationAction(context, accountID, notification, null, "Refollow", NotificationAction.FAVORITE));
+ case FOLLOW -> {
+// if ( notification != null && notification.status.account.)
+ builder.addAction(buildNotificationAction(context, accountID, notification, context.getString(R.string.sk_notification_action_follow), NotificationAction.FAVORITE));
+ }
+ }
}
nm.notify(accountID, GlobalUserPreferences.keepOnlyLatestNotification ? NOTIFICATION_ID : notificationId++, builder.build());
diff --git a/mastodon/src/main/res/values/strings_sk.xml b/mastodon/src/main/res/values/strings_sk.xml
index 4f011a022..ba8724690 100644
--- a/mastodon/src/main/res/values/strings_sk.xml
+++ b/mastodon/src/main/res/values/strings_sk.xml
@@ -265,4 +265,5 @@
Favorite
Bookmark
Boost
+ Refollow
\ No newline at end of file