From 3dbe1ea64933d289ca495f813dbba8ae449d56f6 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 29 Aug 2023 09:05:12 -0500 Subject: [PATCH] Fix command UI on tablet view --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index c834d9212721491fb53c652f7550e4fd5d9e5ffb..ddee81e8f76669368018b55e04da59108e9e268a 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -3038,6 +3038,7 @@ public class ConversationFragment extends XmppFragment .setOpenConversation(this.conversation); if (commandAdapter != null && conversation != originalConversation) { + commandAdapter.clear(); conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, activity.xmppConnectionService.isOnboarding(), originalConversation); refreshCommands(false); } @@ -3049,7 +3050,7 @@ public class ConversationFragment extends XmppFragment if (activity == null) return; final Element command = commandAdapter.getItem(position); - activity.startCommand(conversation.getAccount(), command.getAttributeAsJid("jid"), command.getAttribute("node")); + activity.startCommand(ConversationFragment.this.conversation.getAccount(), command.getAttributeAsJid("jid"), command.getAttribute("node")); }); refreshCommands(false); } @@ -3072,6 +3073,7 @@ public class ConversationFragment extends XmppFragment conversation.hideViewPager(); } else { if (!delayShow) conversation.showViewPager(); + binding.commandsViewProgressbar.setVisibility(View.VISIBLE); activity.xmppConnectionService.fetchCommands(conversation.getAccount(), commandJid, (a, iq) -> { if (activity == null) return;