Update registrar

This commit is contained in:
2024-06-12 00:27:34 -04:00
parent 03ca852475
commit 046556cce3
2 changed files with 12 additions and 6 deletions

View File

@@ -105,10 +105,12 @@ func (role ApplicationRole) Icon () tomo.Icon {
// RunApplication is like tomo.Run, but runs an application. If something fails
// to initialize, an error is written to the standard logger.
func RunApplication (application Application) {
err := registrar.Init()
if err != nil { log.Fatal("nasin: could not init registry:", err) }
err := registrar.RegisterBackend()
if err != nil { log.Fatal("nasin: could not register backend:", err) }
err = tomo.Run(func () {
err := application.Init()
err := registrar.SetTheme()
if err != nil { log.Fatal("nasin: could not set theme:", err) }
err = application.Init()
if err != nil { log.Fatal("nasin: could not run application:", err) }
})
if err != nil { log.Fatal("nasin: could not run application:", err) }