Remove Application InputCapture handler
This commit is contained in:
parent
8b3f11175a
commit
bd63810b91
2 changed files with 3 additions and 9 deletions
|
|
@ -48,7 +48,7 @@ func main() {
|
|||
channelsList = ui.NewChannelsList(onChannelsListSelected)
|
||||
messagesTextView = ui.NewMessagesTextView(onMessagesTextViewChanged)
|
||||
mainFlex = ui.NewMainFlex(guildsDropDown, channelsList, messagesTextView)
|
||||
app = ui.NewApp(onAppInputCapture)
|
||||
app = ui.NewApp()
|
||||
|
||||
token := util.GetPassword("token")
|
||||
if token != "" {
|
||||
|
|
@ -66,10 +66,6 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
func onAppInputCapture(event *tcell.EventKey) *tcell.EventKey {
|
||||
return event
|
||||
}
|
||||
|
||||
func onLoginFormQuitButtonSelected() {
|
||||
app.Stop()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
package ui
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rivo/tview"
|
||||
)
|
||||
|
||||
func NewApp(onAppInputCapture func(event *tcell.EventKey) *tcell.EventKey) (app *tview.Application) {
|
||||
func NewApp() (app *tview.Application) {
|
||||
app = tview.NewApplication().
|
||||
EnableMouse(true).
|
||||
SetInputCapture(onAppInputCapture)
|
||||
EnableMouse(true)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue