Quote notifications related fixes

- Quote type not being excluded properly
- Quotes tab showing polls
This commit is contained in:
0xd9a 2025-10-29 17:03:21 +05:30
parent b29e5bc194
commit 82e7274733
2 changed files with 14 additions and 7 deletions

View file

@ -226,6 +226,7 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
excludeType.add("follow");
excludeType.add("favourite");
excludeType.add("reblog");
excludeType.add("quote");
excludeType.add("poll");
excludeType.add("follow_request");
excludeType.add("mention");
@ -249,6 +250,8 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
excludeType.remove("favourite");
} else if (notificationType == NotificationTypeEnum.REBLOGS) {
excludeType.remove("reblog");
} else if (notificationType == NotificationTypeEnum.QUOTES) {
excludeType.remove("quote");
} else if (notificationType == NotificationTypeEnum.POLLS) {
excludeType.remove("poll");
} else if (notificationType == NotificationTypeEnum.UPDATES) {
@ -723,10 +726,12 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
MENTIONS("MENTIONS"),
@SerializedName("FAVOURITES")
FAVOURITES("FAVOURITES"),
@SerializedName("REBLOGS")
UPDATES("UPDATES"),
@SerializedName("UPDATES")
UPDATES("UPDATES"),
@SerializedName("REBLOGS")
REBLOGS("REBLOGS"),
@SerializedName("QUOTES")
QUOTES("QUOTES"),
@SerializedName("POLLS")
POLLS("POLLS"),
@SerializedName("ADMIN_SIGNUP")

View file

@ -69,16 +69,18 @@ public class FedilabNotificationPageAdapter extends FragmentStatePagerAdapter {
case 3 ->
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.REBLOGS);
case 4 ->
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.POLLS);
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.QUOTES);
case 5 ->
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.TOOTS);
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.POLLS);
case 6 ->
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.FOLLOWS);
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.TOOTS);
case 7 ->
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.UPDATES);
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.FOLLOWS);
case 8 ->
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.ADMIN_SIGNUP);
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.UPDATES);
case 9 ->
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.ADMIN_SIGNUP);
case 10 ->
bundle.putSerializable(Helper.ARG_NOTIFICATION_TYPE, FragmentMastodonNotification.NotificationTypeEnum.ADMIN_REPORT);
}
}