From d56477d1668c675708f7f79018c2e8f171637615 Mon Sep 17 00:00:00 2001 From: citrons Date: Sat, 7 Jun 2025 17:44:10 -0500 Subject: channel list context menu --- client/channel_window.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'client/channel_window.go') diff --git a/client/channel_window.go b/client/channel_window.go index 95f0dbf..ff9484a 100644 --- a/client/channel_window.go +++ b/client/channel_window.go @@ -209,7 +209,6 @@ func (u userListMsg) Show(odd bool) { } func (cw *channelWindow) userList(callback func(userListMsg)) { - ch := cw.getChannel() cb := func(response proto.Command) { if response.Kind != "list" { return @@ -219,7 +218,13 @@ func (cw *channelWindow) userList(callback func(userListMsg)) { names = append(names, u.Fields[""]) } lastIndex++ - callback(userListMsg {lastIndex, ch.Fields[""], names}) + globalApp.cache.Fetch(cw.location.id, func(ch *proto.Object) { + var name string + if ch != nil { + name = ch.Fields[""] + } + callback(userListMsg {lastIndex, name, names}) + }) } globalApp.Request(proto.NewCmd("list", cw.location.id), cb) } -- cgit v1.2.3