mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
feat(GODT-2621): display pop up warning when IMAP login fails because user is locked (connecting).
This commit is contained in:
committed by
Romain Le Jeune
parent
51288791c0
commit
6ba8052a1e
@ -1019,6 +1019,16 @@ void QMLBackend::onIMAPLoginFailed(QString const &username) {
|
||||
tr("Your email client can't connect to Proton Bridge. Make sure you are using the local Bridge password shown in Bridge."));
|
||||
break;
|
||||
|
||||
case UserState::Locked:
|
||||
if (user->isNotificationInCooldown(User::ENotification::IMAPLoginWhileLocked)) {
|
||||
return;
|
||||
}
|
||||
user->startNotificationCooldownPeriod(User::ENotification::IMAPLoginWhileLocked, cooldownDurationMs);
|
||||
emit selectUser(user->id(), false);
|
||||
trayIcon_->showErrorPopupNotification(tr("Connection in progress"),
|
||||
tr("Your Proton account in Bridge is being connected. Please wait or restart Bridge."));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -66,6 +66,7 @@ public: // data types
|
||||
enum class ENotification {
|
||||
IMAPLoginWhileSignedOut, ///< An IMAP client tried to login while the user is signed out.
|
||||
IMAPPasswordFailure, ///< An IMAP client provided an invalid password for the user.
|
||||
IMAPLoginWhileLocked, ///< An IMAP client tried to connect while the user is locked.
|
||||
};
|
||||
|
||||
public: // static member function
|
||||
|
||||
Reference in New Issue
Block a user