diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-07 17:44:10 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-07 17:52:14 -0500 |
| commit | d56477d1668c675708f7f79018c2e8f171637615 (patch) | |
| tree | 34b5926b90bc872762ee641a22bccc2e00f73925 /client/channel_list.go | |
| parent | 24b15604403341044fcb5f7ece18ffc9c569a2cf (diff) | |
channel list context menu
Diffstat (limited to 'client/channel_list.go')
| -rw-r--r-- | client/channel_list.go | 20 |
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 { |
