mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
GODT-1381: Use in-memory cache in case local cache is unavailable
- change: refactor GUI notification object - add: global bridge errors - add: when cache on disk cannot be initialized fallback to memory cache - add: show notification for CoD failure - change: do not allow login to IMAP and SMTP when CoD init failed
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with ProtonMail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build build_qt
|
||||
// +build build_qt
|
||||
|
||||
// Package qt provides communication between Qt/QML frontend and Go backend
|
||||
@ -23,12 +24,18 @@ package qt
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/ProtonMail/proton-bridge/internal/bridge"
|
||||
"github.com/ProtonMail/proton-bridge/internal/events"
|
||||
)
|
||||
|
||||
func (f *FrontendQt) watchEvents() {
|
||||
f.WaitUntilFrontendIsReady()
|
||||
|
||||
// First we check bridge global errors for any error that should be shown on GUI.
|
||||
if f.bridge.HasError(bridge.ErrLocalCacheUnavailable) {
|
||||
f.qml.CacheUnavailable()
|
||||
}
|
||||
|
||||
errorCh := f.eventListener.ProvideChannel(events.ErrorEvent)
|
||||
credentialsErrorCh := f.eventListener.ProvideChannel(events.CredentialsErrorEvent)
|
||||
noActiveKeyForRecipientCh := f.eventListener.ProvideChannel(events.NoActiveKeyForRecipientEvent)
|
||||
|
||||
Reference in New Issue
Block a user