Remove commands view and tabs until it's more reliable

This commit is contained in:
12aw 2023-12-07 16:42:06 +01:00
parent 200b003377
commit 1e8283f986
2 changed files with 5 additions and 12 deletions

View file

@ -3531,19 +3531,11 @@ public class ConversationFragment extends XmppFragment
if (commandAdapter != null && conversation != originalConversation) {
commandAdapter.clear();
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, activity.xmppConnectionService.isOnboarding(), originalConversation);
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, activity.xmppConnectionService.isOnboarding(), null);
refreshCommands(false);
}
if (commandAdapter == null && conversation != null) {
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, activity.xmppConnectionService.isOnboarding(), null);
commandAdapter = new CommandAdapter((XmppActivity) getActivity());
binding.commandsView.setAdapter(commandAdapter);
binding.commandsView.setOnItemClickListener((parent, view, position, id) -> {
if (activity == null) return;
final Element command = commandAdapter.getItem(position);
activity.startCommand(ConversationFragment.this.conversation.getAccount(), command.getAttributeAsJid("jid"), command.getAttribute("node"));
});
refreshCommands(false);
}

View file

@ -20,8 +20,8 @@
<com.google.android.material.tabs.TabLayout
android:visibility="gone"
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="?attr/colorPrimary"
android:elevation="@dimen/toolbar_elevation"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
@ -431,7 +431,8 @@
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:layout_height="fill_parent"
android:visibility="gone" >
<ListView
android:id="@+id/commands_view"