summaryrefslogtreecommitdiff
path: root/client/channel_list.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_list.go
parent24b15604403341044fcb5f7ece18ffc9c569a2cf (diff)
channel list context menu
Diffstat (limited to 'client/channel_list.go')
-rw-r--r--client/channel_list.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/client/channel_list.go b/client/channel_list.go
index f7413fd..2daf619 100644
--- a/client/channel_list.go
+++ b/client/channel_list.go
@@ -119,6 +119,26 @@ func (cl *channelList) show(scroll *tui.ScrollState) {
}
}
}
+
+ switch {
+ case tui.MenuOption("list"):
+ w := globalApp.windowCache.Open(entry.location)
+ switch w.(type) {
+ case *channelWindow:
+ w.(*channelWindow).userList(func(msg userListMsg) {
+ globalApp.cmdWindow.Buffer().Add(msg)
+ })
+ }
+ case tui.MenuOption("leave"):
+ w := globalApp.windowCache.Open(entry.location)
+ switch w.(type) {
+ case *channelWindow:
+ defer w.(*channelWindow).leaveChannel()
+ }
+ if entry.location == globalApp.currentWindow {
+ globalApp.goTo(cmdWindowLocation {})
+ }
+ }
ch := globalApp.cache.Get(entry.location.id)
if ch != nil {