(cfg *config.Config)
| 21 | } |
| 22 | |
| 23 | func newMentionsList(cfg *config.Config) *mentionsList { |
| 24 | m := &mentionsList{ |
| 25 | Model: list.NewModel(), |
| 26 | } |
| 27 | m.SetSelectedStyle(tcell.StyleDefault.Reverse(true)) |
| 28 | m.SetKeybinds(list.Keybinds{ |
| 29 | SelectUp: cfg.Keybinds.MentionsList.SelectUp.Keybind, |
| 30 | SelectDown: cfg.Keybinds.MentionsList.SelectDown.Keybind, |
| 31 | SelectTop: cfg.Keybinds.MentionsList.SelectTop.Keybind, |
| 32 | SelectBottom: cfg.Keybinds.MentionsList.SelectBottom.Keybind, |
| 33 | }) |
| 34 | |
| 35 | m.Box = ui.ConfigureBox(m.Box, &cfg.Theme) |
| 36 | m.SetSnapToItems(true).SetTitle("Mentions") |
| 37 | |
| 38 | b := m.BorderSet() |
| 39 | b.BottomLeft, b.BottomRight = b.BottomT, b.BottomT |
| 40 | m.SetBorderSet(b) |
| 41 | |
| 42 | return m |
| 43 | } |
| 44 | |
| 45 | func (m *mentionsList) append(item mentionsListItem) { |
| 46 | m.items = append(m.items, item) |
no test coverage detected