summaryrefslogtreecommitdiff
path: root/ui/buffers.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtz.pm>2021-10-19 21:31:00 +0200
committerHubert Hirtz <hubert@hirtz.pm>2021-10-19 21:31:00 +0200
commitaa0fb28ab5bce9c45f701fc058e2571db40bc459 (patch)
treea007becc6b102278460a9476375d250705631f42 /ui/buffers.go
parentOnly show buffer numbers when necessary (diff)
Cleanup drawVerticalMemberList
Diffstat (limited to 'ui/buffers.go')
-rw-r--r--ui/buffers.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/ui/buffers.go b/ui/buffers.go
index 79d2cf6..823ece0 100644
--- a/ui/buffers.go
+++ b/ui/buffers.go
@@ -6,8 +6,6 @@ import (
"strings"
"time"
- "git.sr.ht/~taiite/senpai/irc"
-
"github.com/gdamore/tcell/v2"
)
@@ -454,38 +452,6 @@ func (bs *BufferList) DrawHorizontalBufferList(screen tcell.Screen, x0, y0, widt
}
}
-func (bs *BufferList) DrawVerticalMemberList(screen tcell.Screen, x0, y0, width, height int, members []irc.Member, offset *int) {
- st := tcell.StyleDefault
-
- if y0+len(members)-*offset < height {
- *offset = y0 + len(members) - height
- if *offset < 0 {
- *offset = 0
- }
- }
-
- for y := y0; y < y0+height; y++ {
- screen.SetContent(x0, y, 0x2502, nil, st)
- for x := x0 + 1; x < x0+width; x++ {
- screen.SetContent(x, y, ' ', nil, st)
- }
- }
-
- for i, m := range members[*offset:] {
- st = tcell.StyleDefault
- x := x0 + 1
- y := y0 + i
-
- if m.PowerLevel != "" {
- printString(screen, &x, y, Styled(string([]rune(m.PowerLevel)[0]), st.Foreground(tcell.ColorGreen)))
- } else {
- x += 1
- }
- name := truncate(m.Name.Name, width-(x-x0), "\u2026")
- printString(screen, &x, y, Styled(name, st))
- }
-}
-
func (bs *BufferList) DrawTimeline(screen tcell.Screen, x0, y0, nickColWidth int) {
for x := x0; x < x0+bs.tlInnerWidth+nickColWidth+9; x++ {
for y := y0; y < y0+bs.tlHeight; y++ {