diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutAdapter.java index 23e8ccb2..ef4ec164 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutAdapter.java @@ -56,6 +56,7 @@ public class ShoutAdapter extends CustomRecyclerView.Adapter { Intent intent = new Intent(context, ProfileActivity.class); Bundle extras = new Bundle(); diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutboxTask.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutboxTask.java index d25bf89e..69cfd819 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutboxTask.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/shoutbox/ShoutboxTask.java @@ -29,6 +29,7 @@ public class ShoutboxTask extends NewParseTask { Element link = user.select("a").first(); String profileUrl = link.attr("href"); String profileName = link.text(); + boolean memberOfTheMonth = link.attr("style").contains("#EA00FF"); Element date = shout.child(1); String dateString = date.text(); @@ -36,7 +37,7 @@ public class ShoutboxTask extends NewParseTask { Element content = shout.child(2); String shoutContent = "" + ParseHelpers.youtubeEmbeddedFix(content); - shouts.add(new Shout(profileName, profileUrl, dateString, shoutContent)); + shouts.add(new Shout(profileName, profileUrl, dateString, shoutContent, memberOfTheMonth)); } Element shoutboxForm = document.select("form[name=tp-shoutbox]").first(); diff --git a/app/src/main/java/gr/thmmy/mthmmy/model/Shout.java b/app/src/main/java/gr/thmmy/mthmmy/model/Shout.java index 4e1148c9..98ccb535 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/model/Shout.java +++ b/app/src/main/java/gr/thmmy/mthmmy/model/Shout.java @@ -2,12 +2,14 @@ package gr.thmmy.mthmmy.model; public class Shout { private final String shouter, shouterProfileURL, date, shout; + private final boolean memberOfTheMonth; - public Shout(String shouter, String shouterProfileURL, String date, String shout) { + public Shout(String shouter, String shouterProfileURL, String date, String shout, boolean memberOfTheMonth) { this.shouter = shouter; this.shouterProfileURL = shouterProfileURL; this.date = date; this.shout = shout; + this.memberOfTheMonth = memberOfTheMonth; } public String getShouter() { @@ -25,4 +27,8 @@ public class Shout { public String getShout() { return shout; } + + public boolean isMemberOfTheMonth() { + return memberOfTheMonth; + } }