@@ 60,7 60,7 @@ func TUI(client *mautrix.Client, elections *election.ElectionsMap) (el *election
app.Stop()
el = RoomTUI(client, resp.JoinedRooms[i], elections)
})
- if err := app.SetRoot(list, true).SetFocus(list).Run(); err != nil {
+ if err := app.SetRoot(list, true).Run(); err != nil {
panic(err)
}
return
@@ 149,7 149,7 @@ func RoomTUI(client *mautrix.Client, roomID id.RoomID, elections *election.Elect
}
ElectionTUI(client, el)
})
- if err := app.SetRoot(list, true).SetFocus(list).Run(); err != nil {
+ if err := app.SetRoot(list, true).Run(); err != nil {
panic(err)
}
return
@@ 183,7 183,7 @@ func joinElectionConfirmation(el *election.Election) (shouldJoin bool) {
shouldJoin = false
}
})
- if err := app.SetRoot(modal, false).SetFocus(modal).Run(); err != nil {
+ if err := app.SetRoot(modal, false).Run(); err != nil {
panic(err)
}
return
@@ 224,7 224,7 @@ func CreateElectionTUI() (title string, candidates []election.Candidate) {
AddButton("-", minus).
AddButton("Done", done)
form.SetTitle("Create an election").SetBorder(true)
- if err := app.SetRoot(form, true).SetFocus(form).Run(); err != nil {
+ if err := app.SetRoot(form, true).Run(); err != nil {
panic(err)
}
if !hitSubmit {
@@ 288,7 288,7 @@ func ElectionTUI(client *mautrix.Client, el *election.Election) {
time.Sleep(1 * time.Second)
}
}()
- if err := app.SetRoot(frame, true).SetFocus(frame).Run(); err != nil {
+ if err := app.SetRoot(frame, true).Run(); err != nil {
panic(err)
}
@@ 331,7 331,7 @@ func Vote(candidates []election.Candidate) []byte {
}
})
- if err := app.SetRoot(form, true).SetFocus(form).Run(); err != nil {
+ if err := app.SetRoot(form, true).Run(); err != nil {
panic(err)
}