Rename ui.NewApplication() to ui.NewApp()
This commit is contained in:
parent
9651934c16
commit
14fa4cca81
2 changed files with 5 additions and 4 deletions
|
|
@ -32,7 +32,7 @@ func main() {
|
|||
channelsList = ui.NewChannelsList(onChannelsListSelected)
|
||||
messagesTextView = ui.NewMessagesTextView(onMessagesTextViewChanged)
|
||||
mainFlex = ui.NewMainFlex(guildsDropDown, channelsList, messagesTextView)
|
||||
app = ui.NewApplication()
|
||||
app = ui.NewApp()
|
||||
|
||||
token := util.GetPassword("token")
|
||||
if token != "" {
|
||||
|
|
@ -45,7 +45,7 @@ func main() {
|
|||
app.SetRoot(loginModal, true)
|
||||
}
|
||||
|
||||
if err := app.EnableMouse(true).Run(); err != nil {
|
||||
if err := app.Run(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ import (
|
|||
"github.com/rivo/tview"
|
||||
)
|
||||
|
||||
func NewApplication() (app *tview.Application) {
|
||||
app = tview.NewApplication()
|
||||
func NewApp() (app *tview.Application) {
|
||||
app = tview.NewApplication().
|
||||
EnableMouse(true)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue