Hide the default port in bookmark lists
Bookmark.hostPort gives the address alone for port 9987 and address:port otherwise. The Android connect screen, the myTeamSpeak item lists on desktop and Android, and the display name of an unnamed bookmark use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package eu.lixko.ts3j.client.ui;
|
||||
|
||||
import com.formdev.flatlaf.util.ScaledEmptyBorder;
|
||||
import com.formdev.flatlaf.util.UIScale;
|
||||
import eu.lixko.ts3j.client.config.Bookmark;
|
||||
import eu.lixko.ts3j.client.myts.AccountInfo;
|
||||
import eu.lixko.ts3j.client.myts.MyTeamSpeak;
|
||||
import eu.lixko.ts3j.client.myts.MyTeamSpeakLogin;
|
||||
@@ -416,7 +417,7 @@ final class MyTeamSpeakPanel extends JPanel {
|
||||
default -> "";
|
||||
};
|
||||
case 2 -> switch (r.item()) {
|
||||
case SyncItem.Bookmark b -> b.address() + ":" + b.port();
|
||||
case SyncItem.Bookmark b -> Bookmark.hostPort(b.address(), b.port());
|
||||
case SyncItem.Identity i -> i.nickname();
|
||||
default -> "";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user