From b320dea4d9649bd9ebe83e17b60d0763e48336f3 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 8 Nov 2019 12:18:39 +0100 Subject: [PATCH] fixed spinning wheel when switching between local and jabber.network discovery --- .../siacs/conversations/ui/ChannelDiscoveryActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java b/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java index d98fa48e7..5dfcf9bdc 100644 --- a/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ChannelDiscoveryActivity.java @@ -168,9 +168,16 @@ public class ChannelDiscoveryActivity extends XmppActivity implements MenuItem.O }); dialog.setCanceledOnTouchOutside(false); dialog.show(); + holdLoading(); } } + private void holdLoading() { + adapter.submitList(Collections.emptyList()); + binding.progressBar.setVisibility(View.GONE); + binding.list.setBackgroundColor(StyledAttributes.getColor(this, R.attr.color_background_primary)); + } + @Override public void onSaveInstanceState(Bundle savedInstanceState) { if (mMenuSearchView != null && mMenuSearchView.isActionViewExpanded()) { @@ -183,6 +190,7 @@ public class ChannelDiscoveryActivity extends XmppActivity implements MenuItem.O SharedPreferences preferences = getPreferences(); preferences.edit().putBoolean(CHANNEL_DISCOVERY_OPT_IN, true).apply(); optedIn = true; + toggleLoadingScreen(); xmppConnectionService.discoverChannels(null, this.method, this); }