aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2019-11-14 20:36:51 +0100
committerChristian Schneppe <christian.schneppe@pix-art.de>2019-11-15 17:14:08 +0100
commit10a29f53a6beada6029ac1032c1d1a937ec1c19a (patch)
treea368d3b779afce22bbc26305d103b24ef86af143 /src
parent533076813ba0c903dda7f12359f71a886386b45f (diff)
fixed spinning wheel when switching between local and jabber.network discovery
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java b/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java
index efcf8d02d..ad3ef893d 100644
--- a/src/main/java/de/pixart/messenger/ui/ChannelDiscoveryActivity.java
+++ b/src/main/java/de/pixart/messenger/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);
}