chore: Add more explaining text for key verification

This commit is contained in:
krille-chan 2024-01-20 15:00:13 +01:00
commit 20c678553a
No known key found for this signature in database
4 changed files with 33 additions and 2 deletions

View file

@ -351,6 +351,16 @@ class BootstrapDialogState extends State<BootstrapDialog> {
onPressed: _recoveryKeyInputLoading
? null
: () async {
final consent = await showOkCancelAlertDialog(
context: context,
title: L10n.of(context)!.verifyOtherDevice,
message: L10n.of(context)!
.verifyOtherDeviceDescription,
okLabel: L10n.of(context)!.ok,
cancelLabel: L10n.of(context)!.cancel,
fullyCapitalizedForMaterial: false,
);
if (consent != OkCancelResult.ok) return;
final req = await showFutureLoadingDialog(
context: context,
future: () async {

View file

@ -70,6 +70,15 @@ class ChatEncryptionSettingsController extends State<ChatEncryptionSettings> {
}
void startVerification() async {
final consent = await showOkCancelAlertDialog(
context: context,
title: L10n.of(context)!.verifyOtherUser,
message: L10n.of(context)!.verifyOtherUserDescription,
okLabel: L10n.of(context)!.ok,
cancelLabel: L10n.of(context)!.cancel,
fullyCapitalizedForMaterial: false,
);
if (consent != OkCancelResult.ok) return;
final req = await room.client.userDeviceKeys[room.directChatMatrixID]!
.startVerification();
req.onUpdate = () {

View file

@ -92,6 +92,15 @@ class DevicesSettingsController extends State<DevicesSettings> {
}
void verifyDeviceAction(Device device) async {
final consent = await showOkCancelAlertDialog(
context: context,
title: L10n.of(context)!.verifyOtherDevice,
message: L10n.of(context)!.verifyOtherDeviceDescription,
okLabel: L10n.of(context)!.ok,
cancelLabel: L10n.of(context)!.cancel,
fullyCapitalizedForMaterial: false,
);
if (consent != OkCancelResult.ok) return;
final req = await Matrix.of(context)
.client
.userDeviceKeys[Matrix.of(context).client.userID!]!