diff --git a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java b/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java index 622c3677a..e7596ed0d 100644 --- a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java @@ -534,10 +534,10 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana if (token == null) { token = account.token; } - if (emojis == null || !emojis.containsKey(currentInstance)) { + if (emojis == null || !emojis.containsKey(instance)) { new Thread(() -> { try { - emojis.put(currentInstance, new EmojiInstance(ComposeActivity.this).getEmojiList(currentInstance)); + emojis.put(instance, new EmojiInstance(ComposeActivity.this).getEmojiList(instance)); } catch (DBException e) { e.printStackTrace(); } diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java index 2d02e143e..fbd59767d 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java @@ -1488,7 +1488,7 @@ public class ComposeAdapter extends RecyclerView.Adapter { try { - displayEmojiPicker(holder); + displayEmojiPicker(holder, account.instance); } catch (DBException e) { e.printStackTrace(); } @@ -1875,7 +1875,7 @@ public class ComposeAdapter extends RecyclerView.Adapter 0) { GridView gridView = new GridView(context); - gridView.setAdapter(new EmojiAdapter(emojis.get(BaseMainActivity.currentInstance))); + gridView.setAdapter(new EmojiAdapter(emojis.get(instance))); gridView.setNumColumns(5); gridView.setOnItemClickListener((parent, view, position, id) -> { - holder.binding.content.getText().insert(holder.binding.content.getSelectionStart(), " :" + emojis.get(BaseMainActivity.currentInstance).get(position).shortcode + ": "); + holder.binding.content.getText().insert(holder.binding.content.getSelectionStart(), " :" + emojis.get(instance).get(position).shortcode + ": "); alertDialogEmoji.dismiss(); }); gridView.setPadding(paddingDp, paddingDp, paddingDp, paddingDp);