diff options
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java b/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java index 8d2c88c1b..1dee03021 100644 --- a/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java @@ -161,23 +161,22 @@ 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; } @Override public void onChannelSearchResultsFound(final List<MuclumbusService.Room> results) { runOnUiThread(() -> { + adapter.submitList(results); if (results.size() > 0) { - adapter.submitList(results); binding.list.setVisibility(View.VISIBLE); binding.progressBar.setVisibility(View.GONE); this.binding.noResults.setVisibility(View.GONE); } else { - adapter.submitList(results); binding.list.setVisibility(View.GONE); binding.progressBar.setVisibility(View.GONE); this.binding.noResults.setVisibility(View.VISIBLE); |