mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
Other: reactive show on startup
This commit is contained in:
@ -51,6 +51,7 @@ type FrontendQt struct {
|
||||
noEncConfirmator types.NoEncConfirmator
|
||||
autostart *autostart.App
|
||||
restarter types.Restarter
|
||||
showOnStartup bool
|
||||
|
||||
authClient pmapi.Client
|
||||
auth *pmapi.Auth
|
||||
@ -100,19 +101,13 @@ func New(
|
||||
bridge: bridge,
|
||||
autostart: autostart,
|
||||
restarter: restarter,
|
||||
showOnStartup: showWindowOnStart,
|
||||
}
|
||||
|
||||
// Initializing.Done is only called sync.Once. Please keep the increment
|
||||
// set to 1
|
||||
f.initializing.Add(1)
|
||||
|
||||
if showWindowOnStart {
|
||||
go func() {
|
||||
f.initializing.Wait()
|
||||
f.qml.ShowMainWindow()
|
||||
}()
|
||||
}
|
||||
|
||||
return f
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user