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_list.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'client/channel_list.go') 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 { -- cgit v1.2.3