Prompt before deleting the database

pull/1224/head
Nicolas Werner 2 years ago
parent eb4994ea87
commit 1f77e1c810
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 3
      src/Cache.cpp
  2. 14
      src/ChatPage.cpp

@ -361,7 +361,8 @@ fatalSecretError()
"have multiple reasons. Check if your D-Bus service is running and you have configured a " "have multiple reasons. Check if your D-Bus service is running and you have configured a "
"service like KWallet, Gnome Keyring, KeePassXC or the equivalent for your platform. If " "service like KWallet, Gnome Keyring, KeePassXC or the equivalent for your platform. If "
"you are having trouble, feel free to open an issue here: " "you are having trouble, feel free to open an issue here: "
"https://github.com/Nheko-Reborn/nheko/issues")); "https://github.com/Nheko-Reborn/nheko/issues"),
QMessageBox::StandardButton::Close);
QCoreApplication::exit(1); QCoreApplication::exit(1);
exit(1); exit(1);

@ -378,6 +378,20 @@ ChatPage::dropToLoginPage(const QString &msg)
http::client()->shutdown(); http::client()->shutdown();
connectivityTimer_.stop(); connectivityTimer_.stop();
auto btn = QMessageBox::warning(
nullptr,
tr("Confirm logout"),
tr("Because of the following reason Nheko wants to drop you to the login page:\n%1\nIf you "
"think this is a mistake, you can close Nheko instead to possibly recover your encrpytion "
"keys. After you have been dropped to the login page, you can sign in again using your "
"usual methods."),
QMessageBox::StandardButton::Close | QMessageBox::StandardButton::Ok,
QMessageBox::StandardButton::Ok);
if (btn == QMessageBox::StandardButton::Close) {
QCoreApplication::exit(1);
exit(1);
}
resetUI(); resetUI();
deleteConfigs(); deleteConfigs();

Loading…
Cancel
Save