Manager refactor, part 1 (#4298)

* Move BackupDatabase and AnonymiseDatabase to internal/manager
* Rename config.Instance to config.Config
* Rename FFMPEG
* Rework manager and initialization process
* Fix Makefile
* Tweak phasher
* Fix config races
* Fix setup error not clearing
This commit is contained in:
DingDongSoLong4
2023-11-28 04:56:46 +02:00
committed by GitHub
parent fc1fc20df4
commit b78771dbcd
45 changed files with 1230 additions and 1213 deletions

View File

@@ -16,10 +16,6 @@ import (
"golang.org/x/term"
)
type ShutdownHandler interface {
Shutdown(code int)
}
type FaviconProvider interface {
GetFavicon() []byte
GetFaviconPng() []byte
@@ -27,7 +23,7 @@ type FaviconProvider interface {
// Start starts the desktop icon process. It blocks until the process exits.
// MUST be run on the main goroutine or will have no effect on macOS
func Start(shutdownHandler ShutdownHandler, faviconProvider FaviconProvider) {
func Start(exit chan<- int, faviconProvider FaviconProvider) {
if IsDesktop() {
hideConsole()
@@ -36,7 +32,7 @@ func Start(shutdownHandler ShutdownHandler, faviconProvider FaviconProvider) {
openURLInBrowser("")
}
writeStashIcon(faviconProvider)
startSystray(shutdownHandler, faviconProvider)
startSystray(exit, faviconProvider)
}
}