From 20026fc01ab3af1306e95dfc9c4d6e558486b348 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Wed, 23 Aug 2023 15:05:06 -0300 Subject: [PATCH] refactor: fix StatusDisplayItem's compilation errors --- .../android/ui/displayitems/FooterStatusDisplayItem.java | 2 +- .../android/ui/displayitems/PollOptionStatusDisplayItem.java | 2 -- .../joinmastodon/android/ui/displayitems/StatusDisplayItem.java | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java index cf91c1d8f..ad165fbfe 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java @@ -205,7 +205,7 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{ itemView.requestLayout(); reactKeyboardVisible=false; - emojiKeyboard=new CustomEmojiPopupKeyboard(activity, AccountSessionManager.getInstance().getCustomEmojis(accountSession.domain), accountSession.domain, true); + emojiKeyboard=new CustomEmojiPopupKeyboard(activity, AccountSessionManager.getInstance().getCustomEmojis(accountSession.domain), accountSession.domain, true, item.accountID); emojiKeyboard.setListener(new CustomEmojiPopupKeyboard.Listener(){ @Override public void onEmojiSelected(Emoji emoji) { diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PollOptionStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PollOptionStatusDisplayItem.java index 8263f6ebc..f6a45a0ce 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PollOptionStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PollOptionStatusDisplayItem.java @@ -25,7 +25,6 @@ import me.grishka.appkit.imageloader.requests.ImageLoaderRequest; public class PollOptionStatusDisplayItem extends StatusDisplayItem{ private CharSequence text; public final Poll.Option option; - public final Status status; private CustomEmojiHelper emojiHelper=new CustomEmojiHelper(); private boolean showResults; private float votesFraction; // 0..1 @@ -38,7 +37,6 @@ public class PollOptionStatusDisplayItem extends StatusDisplayItem{ this.optionIndex=optionIndex; option=poll.options.get(optionIndex); this.poll=poll; - this.status=status; text=HtmlParser.parseCustomEmoji(option.title, poll.emojis); emojiHelper.setText(text); showResults=poll.isExpired() || poll.voted; diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java index cbf7371d3..0d46da705 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java @@ -281,7 +281,7 @@ public abstract class StatusDisplayItem{ contentItems.add(new AudioStatusDisplayItem(parentID, fragment, statusForContent, att)); } if(att.type==Attachment.Type.UNKNOWN){ - contentItems.add(new FileStatusDisplayItem(parentID, fragment, att)); + contentItems.add(new FileStatusDisplayItem(parentID, fragment, att, statusForContent)); } } if(statusForContent.poll!=null){