Merge branch 'account_activity_title' of https://github.com/raphaelm/Tusky into raphaelm-account_activity_title
This commit is contained in:
commit
8b4bf0ab33
|
@ -107,8 +107,18 @@ public class AccountActivity extends BaseActivity {
|
||||||
@AttrRes int attribute;
|
@AttrRes int attribute;
|
||||||
if (collapsingToolbar.getHeight() + verticalOffset
|
if (collapsingToolbar.getHeight() + verticalOffset
|
||||||
< 2 * ViewCompat.getMinimumHeight(collapsingToolbar)) {
|
< 2 * ViewCompat.getMinimumHeight(collapsingToolbar)) {
|
||||||
|
if (getSupportActionBar() != null && loadedAccount != null) {
|
||||||
|
getSupportActionBar().setTitle(loadedAccount.getDisplayName());
|
||||||
|
getSupportActionBar().setSubtitle(
|
||||||
|
String.format(getString(R.string.status_username_format),
|
||||||
|
loadedAccount.username));
|
||||||
|
}
|
||||||
attribute = R.attr.account_toolbar_icon_tint_collapsed;
|
attribute = R.attr.account_toolbar_icon_tint_collapsed;
|
||||||
} else {
|
} else {
|
||||||
|
if (getSupportActionBar() != null) {
|
||||||
|
getSupportActionBar().setTitle("");
|
||||||
|
getSupportActionBar().setSubtitle("");
|
||||||
|
}
|
||||||
attribute = R.attr.account_toolbar_icon_tint_uncollapsed;
|
attribute = R.attr.account_toolbar_icon_tint_uncollapsed;
|
||||||
}
|
}
|
||||||
if (attribute != priorAttribute) {
|
if (attribute != priorAttribute) {
|
||||||
|
|
Loading…
Reference in New Issue