Improve preview loading message flickering (#1154)

* Improve preview loading

* Change timeout to 100 milliseconds

* Add previewtimeout option

* Start preview outside other goroutines

* Revert previewtimeout option
This commit is contained in:
Joe Lim authored and GitHub committed 2023-03-21 19:49:37 +03:00
1 parent 25288fd90b
commit 68e2433d48
3 files changed
+31 -8

No files matched your search

+3
View File
@@ -467,6 +467,9 @@ func (app *app) loop() {
app.nav.renew()
app.ui.loadFile(app, false)
app.ui.draw(app.nav)
case <-app.nav.previewTimer.C:
app.nav.previewLoading = true
app.ui.draw(app.nav)
}
}
}