get rid of command blicks
This commit is contained in:
parent
79c7a3748c
commit
c427596107
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue