forked from mirror/monocles_chat_clean
Remove commands view and tabs until it's more reliable
This commit is contained in:
parent
200b003377
commit
1e8283f986
2 changed files with 5 additions and 12 deletions
|
@ -3531,19 +3531,11 @@ public class ConversationFragment extends XmppFragment
|
||||||
|
|
||||||
if (commandAdapter != null && conversation != originalConversation) {
|
if (commandAdapter != null && conversation != originalConversation) {
|
||||||
commandAdapter.clear();
|
commandAdapter.clear();
|
||||||
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, activity.xmppConnectionService.isOnboarding(), originalConversation);
|
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, activity.xmppConnectionService.isOnboarding(), null);
|
||||||
refreshCommands(false);
|
refreshCommands(false);
|
||||||
}
|
}
|
||||||
if (commandAdapter == null && conversation != null) {
|
if (commandAdapter == null && conversation != null) {
|
||||||
conversation.setupViewPager(binding.conversationViewPager, binding.tabLayout, activity.xmppConnectionService.isOnboarding(), 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);
|
refreshCommands(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:id="@+id/tab_layout"
|
android:id="@+id/tab_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="0dp"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
android:elevation="@dimen/toolbar_elevation"
|
android:elevation="@dimen/toolbar_elevation"
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||||
|
@ -431,7 +431,8 @@
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent"
|
||||||
|
android:visibility="gone" >
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/commands_view"
|
android:id="@+id/commands_view"
|
||||||
|
|
Loading…
Add table
Reference in a new issue