mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-07 00:20:08 +02:00
comment #702 - Fix custom emoji reactions
This commit is contained in:
parent
31929850c3
commit
a859f3cbef
1 changed files with 1 additions and 5 deletions
|
@ -555,8 +555,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
int paddingDp = (int) (paddingPixel * density);
|
int paddingDp = (int) (paddingPixel * density);
|
||||||
builder.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
builder.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||||
builder.setTitle(R.string.insert_emoji);
|
builder.setTitle(R.string.insert_emoji);
|
||||||
|
if (emojis != null && emojis.size() > 0) {
|
||||||
if (emojis != null && emojis.size() > 0 && emojis.get(BaseMainActivity.currentInstance) != null) {
|
|
||||||
GridView gridView = new GridView(context);
|
GridView gridView = new GridView(context);
|
||||||
gridView.setAdapter(new EmojiAdapter(emojis.get(BaseMainActivity.currentInstance)));
|
gridView.setAdapter(new EmojiAdapter(emojis.get(BaseMainActivity.currentInstance)));
|
||||||
gridView.setNumColumns(5);
|
gridView.setNumColumns(5);
|
||||||
|
@ -565,9 +564,6 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
String url = emojis.get(BaseMainActivity.currentInstance).get(index).url;
|
String url = emojis.get(BaseMainActivity.currentInstance).get(index).url;
|
||||||
String static_url = emojis.get(BaseMainActivity.currentInstance).get(index).static_url;
|
String static_url = emojis.get(BaseMainActivity.currentInstance).get(index).static_url;
|
||||||
boolean alreadyAdded = false;
|
boolean alreadyAdded = false;
|
||||||
if (status.pleroma == null || status.pleroma.emoji_reactions == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (Reaction reaction : status.pleroma.emoji_reactions) {
|
for (Reaction reaction : status.pleroma.emoji_reactions) {
|
||||||
if (reaction.name.compareTo(emojiStr) == 0 && reaction.me) {
|
if (reaction.name.compareTo(emojiStr) == 0 && reaction.me) {
|
||||||
alreadyAdded = true;
|
alreadyAdded = true;
|
||||||
|
|
Loading…
Reference in a new issue