Commit 1758a2c2 authored by Yusuke Iwaki's avatar Yusuke Iwaki

fix user action container to automatically close when each item is selected.

parent e173fca0
......@@ -128,6 +128,7 @@ public class SidebarMainFragment extends AbstractFragment {
private void updateCurrentUserStatus(String status) {
if (methodCallHelper != null) {
methodCallHelper.setUserStatus(status).continueWith(new LogcatIfError());
closeUserActionContainer();
}
}
......@@ -144,10 +145,19 @@ public class SidebarMainFragment extends AbstractFragment {
rootView.findViewById(R.id.btn_logout).setOnClickListener(view -> {
if (methodCallHelper != null) {
methodCallHelper.logout().continueWith(new LogcatIfError());
closeUserActionContainer();
}
});
}
private void closeUserActionContainer() {
final CompoundButton toggleUserAction =
((CompoundButton) rootView.findViewById(R.id.toggle_user_action));
if (toggleUserAction != null && toggleUserAction.isChecked()) {
toggleUserAction.setChecked(false);
}
}
@Override public void onResume() {
super.onResume();
if (roomsObserver != null) {
......
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