diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 6497172be..026021e3f 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -2038,7 +2038,7 @@ public class ConversationFragment extends XmppFragment if (activity == null) return; activity.runOnUiThread(() -> { refresh(); - refreshCommands(true); + refreshCommands(); }); }); } @@ -3060,7 +3060,7 @@ public class ConversationFragment extends XmppFragment if (commandAdapter != null && conversation != originalConversation) { conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, originalConversation); - refreshCommands(false); + refreshCommands(); } if (commandAdapter == null && conversation != null) { conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, null); @@ -3072,7 +3072,7 @@ public class ConversationFragment extends XmppFragment final Element command = commandAdapter.getItem(position); activity.startCommand(conversation.getAccount(), command.getAttributeAsJid("jid"), command.getAttribute("node")); }); - refreshCommands(false); + refreshCommands(); } replyJumps.clear(); @@ -3081,10 +3081,10 @@ public class ConversationFragment extends XmppFragment } public void refreshForNewCaps() { - refreshCommands(true); + refreshCommands(); } - protected void refreshCommands(boolean delayShow) { + protected void refreshCommands() { if (commandAdapter == null) return; Jid commandJid = conversation.getContact().resourceWhichSupport(Namespace.COMMANDS); @@ -3094,7 +3094,6 @@ public class ConversationFragment extends XmppFragment if (commandJid == null) { conversation.hideViewPager(); } else { - if (!delayShow) conversation.showViewPager(); activity.xmppConnectionService.fetchCommands(conversation.getAccount(), commandJid, (a, iq) -> { if (activity == null) return; @@ -3110,7 +3109,7 @@ public class ConversationFragment extends XmppFragment if (commandAdapter.getCount() < 1) { conversation.hideViewPager(); - } else if (delayShow) { + } else { conversation.showViewPager(); } });