Commit 32a2b274 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Close sidebar on switching servers

parent a04fcded
......@@ -95,6 +95,9 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
toolbar.setNavigationOnClickListener(view -> {
if (pane.isSlideable() && !pane.isOpen()) {
pane.openPane();
if (subPane != null) {
subPane.closePane();
}
}
});
......@@ -203,6 +206,7 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
private void changeServerIfNeeded(String serverHostname) {
if (!hostname.equalsIgnoreCase(serverHostname)) {
closeSidebarIfNeeded();
RocketChatCache rocketChatCache = new RocketChatCache(getApplicationContext());
rocketChatCache.setSelectedServerHostname(serverHostname);
recreate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment