mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
feat(GODT-2144): Handle IMAP/SMTP server errors via event stream
This commit is contained in:
@ -256,12 +256,6 @@ func (s *Service) watchEvents() {
|
||||
|
||||
case errors.Is(err, bridge.ErrVaultInsecure):
|
||||
_ = s.SendEvent(NewKeychainHasNoKeychainEvent())
|
||||
|
||||
case errors.Is(err, bridge.ErrServeIMAP):
|
||||
_ = s.SendEvent(NewMailServerSettingsErrorEvent(MailServerSettingsErrorType_IMAP_PORT_STARTUP_ERROR))
|
||||
|
||||
case errors.Is(err, bridge.ErrServeSMTP):
|
||||
_ = s.SendEvent(NewMailServerSettingsErrorEvent(MailServerSettingsErrorType_SMTP_PORT_STARTUP_ERROR))
|
||||
}
|
||||
}
|
||||
|
||||
@ -273,6 +267,12 @@ func (s *Service) watchEvents() {
|
||||
case events.ConnStatusDown:
|
||||
_ = s.SendEvent(NewInternetStatusEvent(false))
|
||||
|
||||
case events.IMAPServerError:
|
||||
_ = s.SendEvent(NewMailServerSettingsErrorEvent(MailServerSettingsErrorType_IMAP_PORT_STARTUP_ERROR))
|
||||
|
||||
case events.SMTPServerError:
|
||||
_ = s.SendEvent(NewMailServerSettingsErrorEvent(MailServerSettingsErrorType_SMTP_PORT_STARTUP_ERROR))
|
||||
|
||||
case events.Raise:
|
||||
_ = s.SendEvent(NewShowMainWindowEvent())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user