~edwargix/tallyard

4ffab6e6f1a8aac70eedc9f8a6112cd582fa34b5 — David Florness 4 years ago 921c59f
Don't vote if election wasn't started
1 files changed, 6 insertions(+), 0 deletions(-)

M ui/tui.go
M ui/tui.go => ui/tui.go +6 -0
@@ 275,6 275,12 @@ func ElectionTUI(client *mautrix.Client, el *election.Election) {
	if err := app.SetRoot(frame, true).SetFocus(frame).Run(); err != nil {
		panic(err)
	}

	if el.StartEvt == nil {
		// election was not started; perhaps user hit C-c?
		return
	}

	el.RLock()
	candidates := el.Candidates
	el.RUnlock()