Replace the native confirm and alert with an in-app dialog. [skip build]
Checks / checks (push) Successful in 2m8s
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-11-01 11:44:17 +11:00
parent 6805762834
commit 9bc8679fb7
6 changed files with 88 additions and 17 deletions
+13 -11
View File
@@ -5,6 +5,7 @@ import { clearNavToActivePathStore } from '../app/state/navToActivePath';
import { Session, getSessionStoreName } from '../app/state/sessions';
import { getSettings } from '../app/state/settings';
import { recordPacket } from '../app/state/debugPackets';
import { promptDialog } from '../app/state/dialog';
const MAX_BODY = 8192;
@@ -242,17 +243,18 @@ const setupKeyConflictHandler = (mx: MatrixClient, session: Session): void => {
// Notify user and reload
setTimeout(() => {
if (
confirm(
'Detected encryption key conflict. The app needs to reset your encryption session. You may need to re-verify your devices after this. Continue?',
)
) {
deleteRustCryptoDatabase(session).then(() => {
window.location.reload();
});
} else {
handlingKeyConflict = false;
}
promptDialog(
'Detected encryption key conflict. The app needs to reset your encryption session. You may need to re-verify your devices after this. Continue?',
true,
).then((continueFix) => {
if (continueFix) {
deleteRustCryptoDatabase(session).then(() => {
window.location.reload();
});
} else {
handlingKeyConflict = false;
}
});
}, 100);
}
}