Rename ui.NewApplication() to ui.NewApp()

This commit is contained in:
rigormorrtiss 2021-07-27 23:45:33 +04:00
parent 9651934c16
commit 14fa4cca81
2 changed files with 5 additions and 4 deletions

View file

@ -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)
}
}

View file

@ -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
}