1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Close #876 - fix todo modal editing feeling slow

Fixes #876. The modal shown when editing todos was feeling slow to start
It required an additional hit of `Enter` to show the modal.

This commit fixes it by queueing a `Draw` update - so now the modal
feels fast to show.

Tests:
* ran `make test`
* tested locally with a todo list
This commit is contained in:
A. Nackov
2020-07-24 08:05:01 +03:00
parent ae097d2e5c
commit f051bdb239
2 changed files with 4 additions and 10 deletions

View File

@@ -181,6 +181,10 @@ func (widget *Widget) updateSelected() {
widget.addButtons(form, saveFctn)
widget.modalFocus(form)
widget.app.QueueUpdate(func() {
widget.app.Draw()
})
}
// updateSelectedItem update the text of the selected item.