fixed loading channel results from cache
This commit is contained in:
parent
e0b5010f24
commit
9bea8074ab
|
@ -166,10 +166,10 @@ public class ChannelDiscoveryActivity extends XmppActivity implements MenuItem.O
|
||||||
@Override
|
@Override
|
||||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||||
if (optedIn) {
|
if (optedIn) {
|
||||||
xmppConnectionService.discoverChannels(v.getText().toString(), this);
|
|
||||||
}
|
|
||||||
toggleLoadingScreen();
|
toggleLoadingScreen();
|
||||||
SoftKeyboardUtils.hideSoftKeyboard(this);
|
SoftKeyboardUtils.hideSoftKeyboard(this);
|
||||||
|
xmppConnectionService.discoverChannels(v.getText().toString(), this);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,6 @@ public class ChannelDiscoveryActivity extends XmppActivity implements MenuItem.O
|
||||||
public void onChannelSearchResultsFound(final List<MuclumbusService.Room> results) {
|
public void onChannelSearchResultsFound(final List<MuclumbusService.Room> results) {
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
adapter.submitList(results);
|
adapter.submitList(results);
|
||||||
binding.list.setVisibility(View.VISIBLE);
|
|
||||||
binding.progressBar.setVisibility(View.GONE);
|
binding.progressBar.setVisibility(View.GONE);
|
||||||
if (results.size() == 0) {
|
if (results.size() == 0) {
|
||||||
binding.list.setBackground(StyledAttributes.getDrawable(this, R.attr.activity_primary_background_no_results));
|
binding.list.setBackground(StyledAttributes.getDrawable(this, R.attr.activity_primary_background_no_results));
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
android:background="?attr/color_background_primary"
|
android:background="?attr/color_background_primary"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:scrollbars="vertical"
|
android:scrollbars="vertical"
|
||||||
android:visibility="gone"
|
|
||||||
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
|
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue