Commit dff4c0e4 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

fix: display name for selected account

This patch fix selected account title for account without profile name.

Change-Id: I0ffc9984af91c07e4fa2ff076b4913afa7ef1ac2
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 04a56126
......@@ -252,9 +252,10 @@ NSMenuItem* selectedMenuItem;
-(NSString*) itemTitleForAccount:(const lrc::api::account::Info&) account {
NSString* alias = bestNameForAccount(account);
NSString* userNameString = [self nameForAccount: account];
if(![alias isEqualToString:userNameString]) {
alias = [NSString stringWithFormat: @"%@\n", alias];
if([alias isEqualToString:userNameString] || [userNameString length] == 0) {
return alias;
}
alias = [NSString stringWithFormat: @"%@\n", alias];
return [alias stringByAppendingString:userNameString];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment