Commit a805d039 authored by Enzo's avatar Enzo

#1 - Change Hostname on logout - added comments

parent 79024d78
...@@ -268,6 +268,7 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain ...@@ -268,6 +268,7 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
rootView.findViewById(R.id.btn_logout).setOnClickListener(view -> { rootView.findViewById(R.id.btn_logout).setOnClickListener(view -> {
presenter.onLogout(); presenter.onLogout();
closeUserActionContainer(); closeUserActionContainer();
//go back to the AddServerActivity
LaunchUtil.showAddServerActivity(getContext()); LaunchUtil.showAddServerActivity(getContext());
}); });
} }
......
...@@ -239,6 +239,7 @@ import rx.subjects.PublishSubject; ...@@ -239,6 +239,7 @@ import rx.subjects.PublishSubject;
if (serviceInterface != null) { if (serviceInterface != null) {
return serviceInterface.disconnectFromServer(hostname) return serviceInterface.disconnectFromServer(hostname)
// //after disconnection from server, remove HOSTNAME key from HashMap
.doAfterTerminate(() -> serverConnectivityList.remove(hostname)); .doAfterTerminate(() -> serverConnectivityList.remove(hostname));
} else { } else {
return Single.error(new IllegalStateException("not prepared")); return Single.error(new IllegalStateException("not prepared"));
......
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