]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java
move profile name from the sub-title to the title
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / MainActivity.java
index a22d9891824a70e9b59bda2cc8b0f4bf81d0d979..1218d0cf3d5cc37a5b4f6c1081f82b83e591d566 100644 (file)
@@ -95,8 +95,8 @@ public class MainActivity extends AppCompatActivity {
         Data.profile.addObserver((o, arg) -> {
             MobileLedgerProfile profile = Data.profile.get();
             runOnUiThread(() -> {
-                if (profile == null) toolbar.setSubtitle("");
-                else toolbar.setSubtitle(profile.getName());
+                if (profile == null) setTitle(R.string.app_name);
+                else setTitle(profile.getName());
             });
         });
 
@@ -240,8 +240,6 @@ public class MainActivity extends AppCompatActivity {
             item.setBackgroundColor(getResources().getColor(R.color.table_row_even_bg));
         }
 
-        setTitle(item.getText());
-
         @ColorInt int transparent = getResources().getColor(android.R.color.transparent);
 
         LinearLayout actions = drawer.findViewById(R.id.nav_actions);