summaryrefslogtreecommitdiff
path: root/client/channel_window.go
diff options
context:
space:
mode:
authorcitrons <citrons@mondecitronne.com>2025-06-07 17:44:10 -0500
committercitrons <citrons@mondecitronne.com>2025-06-07 17:52:14 -0500
commitd56477d1668c675708f7f79018c2e8f171637615 (patch)
tree34b5926b90bc872762ee641a22bccc2e00f73925 /client/channel_window.go
parent24b15604403341044fcb5f7ece18ffc9c569a2cf (diff)
channel list context menu
Diffstat (limited to 'client/channel_window.go')
-rw-r--r--client/channel_window.go9
1 files changed, 7 insertions, 2 deletions
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)
}