forked from Silverfish/proton-bridge
Notify about update right after the start
This commit is contained in:
@ -49,7 +49,9 @@ const (
|
|||||||
// SetupEvents specific to event type and data.
|
// SetupEvents specific to event type and data.
|
||||||
func SetupEvents(listener listener.Listener) {
|
func SetupEvents(listener listener.Listener) {
|
||||||
listener.SetLimit(LogoutEvent, LogoutEventTimeout)
|
listener.SetLimit(LogoutEvent, LogoutEventTimeout)
|
||||||
listener.SetBuffer(TLSCertIssue)
|
|
||||||
listener.SetBuffer(ErrorEvent)
|
listener.SetBuffer(ErrorEvent)
|
||||||
listener.SetBuffer(CredentialsErrorEvent)
|
listener.SetBuffer(CredentialsErrorEvent)
|
||||||
|
listener.SetBuffer(InternetOffEvent)
|
||||||
|
listener.SetBuffer(UpgradeApplicationEvent)
|
||||||
|
listener.SetBuffer(TLSCertIssue)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,10 +109,6 @@ func New(
|
|||||||
// Loop function for Import-Export interface. It runs QtExecute in main thread
|
// Loop function for Import-Export interface. It runs QtExecute in main thread
|
||||||
// with no additional function.
|
// with no additional function.
|
||||||
func (f *FrontendQt) Loop() (err error) {
|
func (f *FrontendQt) Loop() (err error) {
|
||||||
go func() {
|
|
||||||
defer f.panicHandler.HandlePanic()
|
|
||||||
f.watchEvents()
|
|
||||||
}()
|
|
||||||
err = f.QtExecute(func(f *FrontendQt) error { return nil })
|
err = f.QtExecute(func(f *FrontendQt) error { return nil })
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -247,6 +243,11 @@ func (f *FrontendQt) QtExecute(Procedure func(*FrontendQt) error) error {
|
|||||||
f.Qml.SetIsAutoUpdate(false)
|
f.Qml.SetIsAutoUpdate(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer f.panicHandler.HandlePanic()
|
||||||
|
f.watchEvents()
|
||||||
|
}()
|
||||||
|
|
||||||
// Loop
|
// Loop
|
||||||
if ret := gui.QGuiApplication_Exec(); ret != 0 {
|
if ret := gui.QGuiApplication_Exec(); ret != 0 {
|
||||||
//err := errors.New(errors.ErrQApplication, "Event loop ended with return value: %v", string(ret))
|
//err := errors.New(errors.ErrQApplication, "Event loop ended with return value: %v", string(ret))
|
||||||
|
|||||||
@ -154,10 +154,6 @@ func (s *FrontendQt) InstanceExistAlert() {
|
|||||||
//
|
//
|
||||||
// It runs QtExecute in main thread with no additional function.
|
// It runs QtExecute in main thread with no additional function.
|
||||||
func (s *FrontendQt) Loop() (err error) {
|
func (s *FrontendQt) Loop() (err error) {
|
||||||
go func() {
|
|
||||||
defer s.panicHandler.HandlePanic()
|
|
||||||
s.watchEvents()
|
|
||||||
}()
|
|
||||||
err = s.qtExecute(func(s *FrontendQt) error { return nil })
|
err = s.qtExecute(func(s *FrontendQt) error { return nil })
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -250,6 +246,7 @@ func (s *FrontendQt) watchEvents() {
|
|||||||
func (s *FrontendQt) getEventChannel(event string) <-chan string {
|
func (s *FrontendQt) getEventChannel(event string) <-chan string {
|
||||||
ch := make(chan string)
|
ch := make(chan string)
|
||||||
s.eventListener.Add(event, ch)
|
s.eventListener.Add(event, ch)
|
||||||
|
s.eventListener.RetryEmit(event)
|
||||||
return ch
|
return ch
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,9 +363,6 @@ func (s *FrontendQt) qtExecute(Procedure func(*FrontendQt) error) error {
|
|||||||
s.Qml.SetIsEarlyAccess(false)
|
s.Qml.SetIsEarlyAccess(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
s.eventListener.RetryEmit(events.TLSCertIssue)
|
|
||||||
s.eventListener.RetryEmit(events.ErrorEvent)
|
|
||||||
|
|
||||||
// Set reporting of outgoing email without encryption.
|
// Set reporting of outgoing email without encryption.
|
||||||
s.Qml.SetIsReportingOutgoingNoEnc(s.settings.GetBool(settings.ReportOutgoingNoEncKey))
|
s.Qml.SetIsReportingOutgoingNoEnc(s.settings.GetBool(settings.ReportOutgoingNoEncKey))
|
||||||
|
|
||||||
@ -395,6 +389,11 @@ func (s *FrontendQt) qtExecute(Procedure func(*FrontendQt) error) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer s.panicHandler.HandlePanic()
|
||||||
|
s.watchEvents()
|
||||||
|
}()
|
||||||
|
|
||||||
// Loop
|
// Loop
|
||||||
if ret := gui.QGuiApplication_Exec(); ret != 0 {
|
if ret := gui.QGuiApplication_Exec(); ret != 0 {
|
||||||
err := errors.New("Event loop ended with return value:" + string(ret))
|
err := errors.New("Event loop ended with return value:" + string(ret))
|
||||||
|
|||||||
@ -16,3 +16,4 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||||||
### Fixed
|
### Fixed
|
||||||
* GODT-1011 Stable integration test deleting many messages using UID EXPUNGE.
|
* GODT-1011 Stable integration test deleting many messages using UID EXPUNGE.
|
||||||
* GODT-1015 Use lenient version parser to properly parse version provided by Mac.
|
* GODT-1015 Use lenient version parser to properly parse version provided by Mac.
|
||||||
|
* GODT-919 Notify about update right after the start.
|
||||||
|
|||||||
Reference in New Issue
Block a user