fixed loading channel results from cache

This commit is contained in:
Daniel Gultsch 2019-10-11 19:39:45 +02:00
parent e0b5010f24
commit 9bea8074ab
2 changed files with 2 additions and 4 deletions

View File

@ -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<MuclumbusService.Room> 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));

View File

@ -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" />
</android.support.design.widget.CoordinatorLayout>