]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java
collapse profile list and close the drawer when switching profiles
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / MainActivity.java
index 80423bf8cec97b06d63ce15a3b405316065722c3..e5139b236168f57136cd59d05f72d04a238c1713 100644 (file)
@@ -183,6 +183,8 @@ public class MainActivity extends ProfileThemedActivity {
                 }
                 else mProfileListAdapter.notifyDataSetChanged();
 
+                collapseProfileList();
+
                 int newProfileTheme = profile.getThemeId();
                 if (newProfileTheme != Colors.profileThemeId) {
                     Log.d("profiles", String.format("profile theme %d → %d", Colors.profileThemeId,
@@ -190,6 +192,8 @@ public class MainActivity extends ProfileThemedActivity {
                     profileThemeChanged();
                     Colors.profileThemeId = newProfileTheme;
                 }
+                else
+                    drawer.closeDrawers();
             });
         });
         Data.profiles.addObserver((o, arg) -> {