|
|
@ -140,51 +140,61 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|
|
|
String type = notificationList.get(position).type;
|
|
|
|
String type = notificationList.get(position).type;
|
|
|
|
if (type != null) {
|
|
|
|
if (type != null) {
|
|
|
|
switch (type) {
|
|
|
|
switch (type) {
|
|
|
|
case "follow":
|
|
|
|
case "follow" -> {
|
|
|
|
return TYPE_FOLLOW;
|
|
|
|
return TYPE_FOLLOW;
|
|
|
|
case "follow_request":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "follow_request" -> {
|
|
|
|
return TYPE_FOLLOW_REQUEST;
|
|
|
|
return TYPE_FOLLOW_REQUEST;
|
|
|
|
case "mention":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "mention" -> {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
return TYPE_MENTION;
|
|
|
|
return TYPE_MENTION;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "reblog":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "reblog" -> {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
return TYPE_REBLOG;
|
|
|
|
return TYPE_REBLOG;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "update":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "update" -> {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
return TYPE_UPDATE;
|
|
|
|
return TYPE_UPDATE;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "favourite":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "favourite" -> {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
return TYPE_FAVOURITE;
|
|
|
|
return TYPE_FAVOURITE;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "poll":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "poll" -> {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
return TYPE_POLL;
|
|
|
|
return TYPE_POLL;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "status":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "status" -> {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
return TYPE_STATUS;
|
|
|
|
return TYPE_STATUS;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
return TYPE_HIDDEN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "admin.sign_up":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "admin.sign_up" -> {
|
|
|
|
return TYPE_ADMIN_SIGNUP;
|
|
|
|
return TYPE_ADMIN_SIGNUP;
|
|
|
|
case "admin.report":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "admin.report" -> {
|
|
|
|
return TYPE_ADMIN_REPORT;
|
|
|
|
return TYPE_ADMIN_REPORT;
|
|
|
|
case "pleroma:emoji_reaction":
|
|
|
|
}
|
|
|
|
|
|
|
|
case "pleroma:emoji_reaction" -> {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
if (notificationList.get(position).status != null) {
|
|
|
|
return TYPE_REACTION;
|
|
|
|
return TYPE_REACTION;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -192,6 +202,7 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return super.getItemViewType(position);
|
|
|
|
return super.getItemViewType(position);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|