From 9bea8074aba331e959a5dd41fc40277c9e799631 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 11 Oct 2019 19:39:45 +0200 Subject: [PATCH] fixed loading channel results from cache --- .../eu/siacs/conversations/ui/ChannelDiscoveryActivity.java | 5 ++--- src/main/res/layout/activity_channel_discovery.xml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java b/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java index e019b426e..8834e22eb 100644 --- a/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java @@ -166,10 +166,10 @@ public class ChannelDiscoveryActivity extends XmppActivity implements MenuItem.O @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (optedIn) { + toggleLoadingScreen(); + SoftKeyboardUtils.hideSoftKeyboard(this); xmppConnectionService.discoverChannels(v.getText().toString(), this); } - toggleLoadingScreen(); - SoftKeyboardUtils.hideSoftKeyboard(this); return true; } @@ -177,7 +177,6 @@ public class ChannelDiscoveryActivity extends XmppActivity implements MenuItem.O public void onChannelSearchResultsFound(final List results) { runOnUiThread(() -> { adapter.submitList(results); - binding.list.setVisibility(View.VISIBLE); binding.progressBar.setVisibility(View.GONE); if (results.size() == 0) { binding.list.setBackground(StyledAttributes.getDrawable(this, R.attr.activity_primary_background_no_results)); diff --git a/src/main/res/layout/activity_channel_discovery.xml b/src/main/res/layout/activity_channel_discovery.xml index 055b9aff2..34b680622 100644 --- a/src/main/res/layout/activity_channel_discovery.xml +++ b/src/main/res/layout/activity_channel_discovery.xml @@ -34,7 +34,6 @@ android:background="?attr/color_background_primary" android:orientation="vertical" android:scrollbars="vertical" - android:visibility="gone" app:layoutManager="android.support.v7.widget.LinearLayoutManager" />