aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2019-10-26 19:35:17 +0200
committerChristian Schneppe <christian.schneppe@pix-art.de>2019-10-26 19:35:17 +0200
commite336d968904a867169f00b50948dfbc84436bd80 (patch)
treee0187709bfd6baedf5645451df84e701ecfa866f /src/main/java/de/pixart
parent824ba44fd41a9e4df8a78cae4e954fcfc3b99a41 (diff)
fixed loading channel results from cache
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java7
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);