Support follow requests
This commit is contained in:
parent
3074f725e2
commit
2e8bca5e40
|
@ -1,5 +1,6 @@
|
||||||
Added
|
Added
|
||||||
- Original & boost dates added separately
|
- Original & boost dates added separately
|
||||||
|
- Follow request notifications
|
||||||
|
|
||||||
Fixed
|
Fixed
|
||||||
- Counter for mentions
|
- Counter for mentions
|
||||||
|
|
|
@ -1639,6 +1639,7 @@ public class API {
|
||||||
*/
|
*/
|
||||||
public static Notification parseNotificationResponse(Context context, JSONObject resobj) {
|
public static Notification parseNotificationResponse(Context context, JSONObject resobj) {
|
||||||
|
|
||||||
|
|
||||||
Notification notification = new Notification();
|
Notification notification = new Notification();
|
||||||
try {
|
try {
|
||||||
notification.setId(resobj.get("id").toString());
|
notification.setId(resobj.get("id").toString());
|
||||||
|
@ -4811,8 +4812,10 @@ public class API {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!notif_follow)
|
if (!notif_follow) {
|
||||||
parameters.append("exclude_types[]=").append("follow").append("&");
|
parameters.append("exclude_types[]=").append("follow").append("&");
|
||||||
|
parameters.append("exclude_types[]=").append("follow_request").append("&");
|
||||||
|
}
|
||||||
if (!notif_add)
|
if (!notif_add)
|
||||||
parameters.append("exclude_types[]=").append("favourite").append("&");
|
parameters.append("exclude_types[]=").append("favourite").append("&");
|
||||||
if (!notif_share)
|
if (!notif_share)
|
||||||
|
@ -4827,6 +4830,7 @@ public class API {
|
||||||
}
|
}
|
||||||
} else if (type == DisplayNotificationsFragment.Type.MENTION) {
|
} else if (type == DisplayNotificationsFragment.Type.MENTION) {
|
||||||
parameters.append("exclude_types[]=").append("follow").append("&");
|
parameters.append("exclude_types[]=").append("follow").append("&");
|
||||||
|
parameters.append("exclude_types[]=").append("follow_request").append("&");
|
||||||
parameters.append("exclude_types[]=").append("favourite").append("&");
|
parameters.append("exclude_types[]=").append("favourite").append("&");
|
||||||
parameters.append("exclude_types[]=").append("reblog").append("&");
|
parameters.append("exclude_types[]=").append("reblog").append("&");
|
||||||
parameters.append("exclude_types[]=").append("poll").append("&");
|
parameters.append("exclude_types[]=").append("poll").append("&");
|
||||||
|
@ -4834,6 +4838,7 @@ public class API {
|
||||||
params.put("exclude_types[]", parameters.toString());
|
params.put("exclude_types[]", parameters.toString());
|
||||||
} else if (type == DisplayNotificationsFragment.Type.FAVORITE) {
|
} else if (type == DisplayNotificationsFragment.Type.FAVORITE) {
|
||||||
parameters.append("exclude_types[]=").append("follow").append("&");
|
parameters.append("exclude_types[]=").append("follow").append("&");
|
||||||
|
parameters.append("exclude_types[]=").append("follow_request").append("&");
|
||||||
parameters.append("exclude_types[]=").append("mention").append("&");
|
parameters.append("exclude_types[]=").append("mention").append("&");
|
||||||
parameters.append("exclude_types[]=").append("reblog").append("&");
|
parameters.append("exclude_types[]=").append("reblog").append("&");
|
||||||
parameters.append("exclude_types[]=").append("poll").append("&");
|
parameters.append("exclude_types[]=").append("poll").append("&");
|
||||||
|
@ -4841,6 +4846,7 @@ public class API {
|
||||||
params.put("exclude_types[]", parameters.toString());
|
params.put("exclude_types[]", parameters.toString());
|
||||||
} else if (type == DisplayNotificationsFragment.Type.BOOST) {
|
} else if (type == DisplayNotificationsFragment.Type.BOOST) {
|
||||||
parameters.append("exclude_types[]=").append("follow").append("&");
|
parameters.append("exclude_types[]=").append("follow").append("&");
|
||||||
|
parameters.append("exclude_types[]=").append("follow_request").append("&");
|
||||||
parameters.append("exclude_types[]=").append("mention").append("&");
|
parameters.append("exclude_types[]=").append("mention").append("&");
|
||||||
parameters.append("exclude_types[]=").append("favourite").append("&");
|
parameters.append("exclude_types[]=").append("favourite").append("&");
|
||||||
parameters.append("exclude_types[]=").append("poll").append("&");
|
parameters.append("exclude_types[]=").append("poll").append("&");
|
||||||
|
@ -4849,6 +4855,7 @@ public class API {
|
||||||
} else if (type == DisplayNotificationsFragment.Type.POLL) {
|
} else if (type == DisplayNotificationsFragment.Type.POLL) {
|
||||||
parameters.append("exclude_types[]=").append("reblog").append("&");
|
parameters.append("exclude_types[]=").append("reblog").append("&");
|
||||||
parameters.append("exclude_types[]=").append("follow").append("&");
|
parameters.append("exclude_types[]=").append("follow").append("&");
|
||||||
|
parameters.append("exclude_types[]=").append("follow_request").append("&");
|
||||||
parameters.append("exclude_types[]=").append("mention").append("&");
|
parameters.append("exclude_types[]=").append("mention").append("&");
|
||||||
parameters.append("exclude_types[]=").append("favourite").append("&");
|
parameters.append("exclude_types[]=").append("favourite").append("&");
|
||||||
parameters = new StringBuilder(parameters.substring(0, parameters.length() - 1).substring(16));
|
parameters = new StringBuilder(parameters.substring(0, parameters.length() - 1).substring(16));
|
||||||
|
|
|
@ -3336,7 +3336,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
else
|
else
|
||||||
holder.status_document_container.setVisibility(View.VISIBLE);
|
holder.status_document_container.setVisibility(View.VISIBLE);
|
||||||
if (attachments.size() == 1 ) {
|
if (attachments.size() == 1 ) {
|
||||||
if ((status.getCard() == null || status.getCard().getImage() == null)) {
|
if ((status.getCard() == null || status.getCard().getType().compareTo("video") != 0|| status.getCard().getImage() == null)) {
|
||||||
if (!fullAttachement)
|
if (!fullAttachement)
|
||||||
holder.status_container2.setVisibility(View.GONE);
|
holder.status_container2.setVisibility(View.GONE);
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue