fluffychat merge
This commit is contained in:
commit
8432ca8a8d
3 changed files with 53 additions and 13 deletions
|
|
@ -3471,6 +3471,22 @@
|
|||
"@thread": {},
|
||||
"backToMainChat": "Atgriezties galvenajā tērzēšanā",
|
||||
"@backToMainChat": {},
|
||||
"saveChanges": "Saglabāt izmaiņas",
|
||||
"@saveChanges": {},
|
||||
"createSticker": "Izveidot uzlīmi vai emocijzīmi",
|
||||
"@createSticker": {},
|
||||
"useAsSticker": "Izmantot kā uzlīmi",
|
||||
"@useAsSticker": {},
|
||||
"useAsEmoji": "Izmantot kā emocijzīmi",
|
||||
"@useAsEmoji": {},
|
||||
"stickerPackNameAlreadyExists": "Uzlīmju pakas nosaukums jau pastāv",
|
||||
"@stickerPackNameAlreadyExists": {},
|
||||
"newStickerPack": "Jauna uzlīmju paka",
|
||||
"@newStickerPack": {},
|
||||
"stickerPackName": "Uzlīmju pakas nosaukums",
|
||||
"@stickerPackName": {},
|
||||
"attribution": "Piedēvējums",
|
||||
"@attribution": {},
|
||||
"ignore": "Bloķēt",
|
||||
"ignoredUsers": "Bloķētie lietotāji",
|
||||
"writeAMessageLangCodes": "Rakstiet {l1} vai {l2}...",
|
||||
|
|
@ -3514,7 +3530,6 @@
|
|||
"updateLanguage": "Manas valodas",
|
||||
"whatLanguageYouWantToLearn": "Kuru valodu vēlaties iemācīties?",
|
||||
"whatIsYourBaseLanguage": "Kāda ir jūsu pamata valoda?",
|
||||
"saveChanges": "Saglabāt izmaiņas",
|
||||
"publicProfileTitle": "Atļaut, lai manu profilu var atrast meklēšanā",
|
||||
"publicProfileDesc": "Ieslēdzot, jūs ļaujat citiem lietotājiem atrast jūsu profilu globālajā meklēšanas joslā un sūtīt pieprasījumus tērzēšanai. Šajā brīdī jūs varat izvēlēties pieņemt vai noraidīt pieprasījumu.",
|
||||
"errorDisableIT": "Tulkošanas palīdzība ir izslēgta.",
|
||||
|
|
@ -4785,10 +4800,6 @@
|
|||
"type": "String",
|
||||
"placeholders": {}
|
||||
},
|
||||
"@saveChanges": {
|
||||
"type": "String",
|
||||
"placeholders": {}
|
||||
},
|
||||
"@publicProfileTitle": {
|
||||
"type": "String",
|
||||
"placeholders": {}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
|
|
@ -419,8 +421,33 @@ class BootstrapDialogState extends State<BootstrapDialog> {
|
|||
},
|
||||
);
|
||||
if (req.error != null) return;
|
||||
await KeyVerificationDialog(request: req.result!)
|
||||
.show(context);
|
||||
final success = await KeyVerificationDialog(
|
||||
request: req.result!,
|
||||
).show(context);
|
||||
if (success != true) return;
|
||||
if (!mounted) return;
|
||||
|
||||
final waitForSecret = Completer();
|
||||
final secretsSub = client
|
||||
.encryption!.ssss.onSecretStored.stream
|
||||
.listen((
|
||||
event,
|
||||
) async {
|
||||
if (await client.encryption!.keyManager
|
||||
.isCached() &&
|
||||
await client.encryption!.crossSigning
|
||||
.isCached()) {
|
||||
waitForSecret.complete();
|
||||
}
|
||||
});
|
||||
|
||||
final result = await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => waitForSecret.future,
|
||||
);
|
||||
await secretsSub.cancel();
|
||||
if (!mounted) return;
|
||||
if (!result.isError) _goBackAction(true);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import 'package:fluffychat/widgets/avatar.dart';
|
|||
import 'package:fluffychat/widgets/future_loading_dialog.dart';
|
||||
|
||||
class KeyVerificationDialog extends StatefulWidget {
|
||||
Future<void> show(BuildContext context) => showAdaptiveDialog(
|
||||
Future<bool?> show(BuildContext context) => showAdaptiveDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) => this,
|
||||
barrierDismissible: false,
|
||||
|
|
@ -186,9 +186,9 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
|
|||
);
|
||||
buttons.add(
|
||||
AdaptiveDialogAction(
|
||||
onPressed: () => widget.request
|
||||
.rejectVerification()
|
||||
.then((_) => Navigator.of(context, rootNavigator: false).pop()),
|
||||
onPressed: () => widget.request.rejectVerification().then(
|
||||
(_) => Navigator.of(context, rootNavigator: false).pop(false),
|
||||
),
|
||||
child: Text(
|
||||
L10n.of(context).reject,
|
||||
style: TextStyle(color: theme.colorScheme.error),
|
||||
|
|
@ -318,7 +318,8 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
|
|||
child: Text(
|
||||
L10n.of(context).close,
|
||||
),
|
||||
onPressed: () => Navigator.of(context, rootNavigator: false).pop(),
|
||||
onPressed: () =>
|
||||
Navigator.of(context, rootNavigator: false).pop(true),
|
||||
),
|
||||
);
|
||||
break;
|
||||
|
|
@ -342,7 +343,8 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
|
|||
child: Text(
|
||||
L10n.of(context).close,
|
||||
),
|
||||
onPressed: () => Navigator.of(context, rootNavigator: false).pop(),
|
||||
onPressed: () =>
|
||||
Navigator.of(context, rootNavigator: false).pop(false),
|
||||
),
|
||||
);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue