Adjust account label check (#2369)

This commit is contained in:
Janosch Maier 2022-03-01 19:14:05 +01:00 committed by GitHub
parent 06926efbf5
commit 406270d0c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -505,16 +505,10 @@ export class Contact extends Model {
return null;
}
if (includeAccountLabel) {
FocusedPerspectiveStore =
FocusedPerspectiveStore || require('../stores/focused-perspective-store').default;
if (
account &&
(FocusedPerspectiveStore.current().accountIds.length > 1 || forceAccountLabel)
) {
return `You (${account.label})`;
}
if (includeAccountLabel && account && (AccountStore.accounts().length > 1 || forceAccountLabel)) {
return `${localized('You')} (${account.label})`;
}
return localized('You');
}