From 995bf9d37e81fbb07818198859d624d9558f58e7 Mon Sep 17 00:00:00 2001 From: tom79 Date: Sun, 24 Feb 2019 11:08:15 +0100 Subject: [PATCH] Retrieve if the message is liked - #826 --- app/src/main/java/fr/gouv/etalab/mastodon/client/GNUAPI.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/client/GNUAPI.java b/app/src/main/java/fr/gouv/etalab/mastodon/client/GNUAPI.java index f4ff61231..d0417f222 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/client/GNUAPI.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/client/GNUAPI.java @@ -1882,6 +1882,9 @@ public class GNUAPI { }catch (Exception e){ status.setFavourited(false); } + if( resobj.has("friendica_activities") && resobj.getJSONObject("friendica_activities").has("like")){ + status.setFavourited(resobj.getJSONObject("friendica_activities").getJSONArray("like").length() !=0); + } status.setMuted(false); status.setPinned(false); try{