优化外置登录账号名称展示 (#6204)

This commit is contained in:
辞庐 authored and GitHub committed 2026-06-21 14:04:52 +08:00
1 parent f0fcc4ac5e
commit 90eb622903
1 file changed
+3 -3
@@ -57,8 +57,8 @@ import java.util.concurrent.CancellationException;
import static java.util.Collections.emptySet;
import static javafx.beans.binding.Bindings.createBooleanBinding;
import static org.jackhuang.hmcl.util.logging.Logger.LOG;
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
import static org.jackhuang.hmcl.util.logging.Logger.LOG;
public class AccountListItem extends RadioButton {
@@ -86,8 +86,8 @@ public class AccountListItem extends RadioButton {
String name = account.getProfileName();
return StringUtils.isBlank(name) ? account.getProfileID().toString() : name;
}, account);
if (account instanceof ClassicAccount classicAccount && !(account instanceof OfflineAccount)) {
title.bind(Bindings.concat(classicAccount.getLoginName(), " - ", profileName));
if (account instanceof ClassicAccount classicAccount) {
title.bind(Bindings.concat(profileName, " - ", classicAccount.getLoginName()));
} else {
title.bind(profileName);
}