[android] Display username instead of profile.

This commit is contained in:
Dmitry Yunitsky 2016-04-13 14:50:21 +03:00
parent 735be8c6b1
commit 3a64022320
2 changed files with 5 additions and 0 deletions

View file

@ -25,6 +25,7 @@
android:layout_marginStart="@dimen/margin_half"
android:background="?circleAccent"
android:scaleType="center"
android:tint="?cardBackground"
tools:src="@drawable/ic_device"/>
<LinearLayout

View file

@ -83,8 +83,12 @@ public class SettingsActivity extends PreferenceActivity
for (Header h : target)
{
mHeaders.put(h.id, h);
// Hack to change profile header to username, if user is logged in.
if (h.id == R.id.osm_profile && OsmOAuth.isAuthorized())
{
h.titleRes = 0;
h.title = OsmOAuth.getUsername();
}
}
}