diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-05 19:50:37 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-07 16:02:18 -0500 |
| commit | 1c3bc122c47d71d00a5d452bf9032ef6b4af67e5 (patch) | |
| tree | d24e118750de176940877b7b3bb6914e09cff29e /client/channel_window.go | |
| parent | 0f1c3ef1871f311d79f8274585bdb2925152f576 (diff) | |
more compact list command
Diffstat (limited to 'client/channel_window.go')
| -rw-r--r-- | client/channel_window.go | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/client/channel_window.go b/client/channel_window.go index cb00761..3fec792 100644 --- a/client/channel_window.go +++ b/client/channel_window.go @@ -184,29 +184,27 @@ func (u userListMsg) Show(odd bool) { tui.Pop() tui.Push("", tui.Box {Width: tui.Fill, Height: tui.Children}) + tui.Push("", tui.Box {Width: tui.Fill, Height: tui.TextSize}) tui.Text(strconv.Itoa(len(u.names)), nil) tui.Text(" users in ", nil) tui.Text(u.channelName, nameStyle) tui.Pop() - for _, name := range u.names { - tui.Push("", tui.Box { - Width: tui.Fill, Height: tui.Children, Dir: tui.Right, - }) - tui.Push("", tui.Box {Width: tui.TextSize, Height: tui.TextSize}) - tui.Text(" * ", nil) - tui.Pop() - - tui.Push("", tui.Box {Width: tui.TextSize, Height: tui.TextSize}) + tui.Push("names", tui.Box { + Width: tui.Fill, Height: tui.TextSize, Margins: [4]int {1, 0, 0, 0}, + }) + for i, name := range u.names { tui.Text(name, nameStyle) - tui.Pop() - - tui.Pop() + if i < len(u.names) - 1 { + tui.Text(", ", nil) + } } tui.Pop() tui.Pop() + + tui.Pop() } func (cw *channelWindow) userList(callback func(userListMsg)) { |
