| 108 | func (w *fakeGroup) Wait() {} |
| 109 | |
| 110 | func newExtList(opts ExtBrowseOpts, ui uiRegistry, extEntries []extEntry) *extList { |
| 111 | ui.List.SetTitleColor(tcell.ColorWhite) |
| 112 | ui.List.SetSelectedTextColor(tcell.ColorBlack) |
| 113 | ui.List.SetSelectedBackgroundColor(tcell.ColorWhite) |
| 114 | ui.List.SetWrapAround(false) |
| 115 | ui.List.SetBorderPadding(1, 1, 1, 1) |
| 116 | ui.List.SetSelectedFunc(func(ix int, _, _ string, _ rune) { |
| 117 | ui.Pages.SwitchToPage("readme") |
| 118 | }) |
| 119 | |
| 120 | el := &extList{ |
| 121 | ui: ui, |
| 122 | extEntries: extEntries, |
| 123 | app: ui.App, |
| 124 | opts: opts, |
| 125 | QueueUpdateDraw: ui.App.QueueUpdateDraw, |
| 126 | WaitGroup: &fakeGroup{}, |
| 127 | } |
| 128 | |
| 129 | el.Reset() |
| 130 | return el |
| 131 | } |
| 132 | |
| 133 | func (el *extList) createModal() *tview.Modal { |
| 134 | m := tview.NewModal() |