gte/cmd/android-app/main.go

29 lines
674 B
Go
Raw Normal View History

2022-10-18 16:58:12 +02:00
package main
import (
"ewintr.nl/gte/cmd/android-app/component"
"ewintr.nl/gte/cmd/android-app/runner"
"fyne.io/fyne/v2/app"
2022-10-23 14:08:19 +02:00
"fyne.io/fyne/v2/storage"
)
2022-10-18 16:58:12 +02:00
func main() {
fyneApp := app.NewWithID("nl.ewintr.gte")
2022-10-24 15:57:55 +02:00
fyneWindow := fyneApp.NewWindow("gte - getting things email")
conf := component.NewConfigurationFromPreferences(fyneApp.Preferences())
conf.Load()
logger := component.NewLogger()
2022-10-23 14:08:19 +02:00
tasksURI, err := storage.Child(fyneApp.Storage().RootURI(), "tasks.json")
if err != nil {
logger.Log(err.Error())
}
r := runner.NewRunner(conf, tasksURI, logger)
2022-10-24 15:57:55 +02:00
rootContainer := r.Init()
fyneWindow.SetContent(rootContainer)
2022-10-23 12:45:21 +02:00
go r.Run()
2022-10-24 15:57:55 +02:00
fyneWindow.ShowAndRun()
2022-10-18 16:58:12 +02:00
}