mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Prompt before deleting the database
This commit is contained in:
parent
eb4994ea87
commit
1f77e1c810
2 changed files with 16 additions and 1 deletions
|
@ -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…
Reference in a new issue