Name the server node and stop it collapsing

The tree's top row showed the placeholder name, since nothing ever read the
real one; take it from initserver, which ts3j now keeps.

There is only ever one top-level row, so its expand control bought nothing and
cost horizontal space in a narrow view. Drop it, ignore collapse requests on
the root, and tighten the per-level indent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-14 14:15:32 +00:00
parent 46206e3047
commit d37c6c9ba9
3 changed files with 20 additions and 2 deletions

View File

@@ -338,6 +338,8 @@ public final class TeamspeakConnection implements TS3Listener {
} catch (Exception e) {
ui.onStatus("Limited subscription: " + rootMessage(e));
}
// The name comes with initserver; servergetvariables never reports it.
model.setServerName(client.getServerName());
try {
for (Channel ch : client.listChannels()) {
model.putChannel(ch.getId(), ch.getName(), ch.getParentChannelId(), ch.getOrder());