fix: Remove dead code

This commit is contained in:
Krille Fear 2021-11-19 19:36:26 +01:00
parent 8d06735b37
commit 1c7ec11a89
2 changed files with 0 additions and 64 deletions

View File

@ -128,11 +128,6 @@
"type": "text",
"placeholders": {}
},
"askSSSSCache": "Please enter your secure store passphrase or recovery key to cache the keys.",
"@askSSSSCache": {
"type": "text",
"placeholders": {}
},
"askSSSSSign": "To be able to sign the other person, please enter your secure store passphrase or recovery key.",
"@askSSSSSign": {
"type": "text",

View File

@ -11,7 +11,6 @@ import 'package:image_picker/image_picker.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/utils/sentry_controller.dart';
import '../../widgets/matrix.dart';
import 'settings_view.dart';
@ -109,64 +108,6 @@ class SettingsController extends State<Settings> {
}
}
Future<void> requestSSSSCache() async {
final handle = Matrix.of(context).client.encryption.ssss.open();
final input = await showTextInputDialog(
useRootNavigator: false,
context: context,
title: L10n.of(context).askSSSSCache,
okLabel: L10n.of(context).ok,
cancelLabel: L10n.of(context).cancel,
textFields: [
DialogTextField(
hintText: L10n.of(context).passphraseOrKey,
obscureText: true,
minLines: 1,
maxLines: 1,
)
],
);
if (input != null) {
final valid = await showFutureLoadingDialog(
context: context,
future: () async {
// make sure the loading spinner shows before we test the keys
await Future.delayed(const Duration(milliseconds: 100));
var valid = false;
try {
await handle.unlock(recoveryKey: input.single);
valid = true;
} catch (e, s) {
SentryController.captureException(e, s);
}
return valid;
});
if (valid.result == true) {
await handle.maybeCacheAll();
await showOkAlertDialog(
useRootNavigator: false,
context: context,
message: L10n.of(context).cachedKeys,
okLabel: L10n.of(context).ok,
);
setState(() {
crossSigningCachedFuture = null;
crossSigningCached = null;
megolmBackupCachedFuture = null;
megolmBackupCached = null;
});
} else {
await showOkAlertDialog(
useRootNavigator: false,
context: context,
message: L10n.of(context).incorrectPassphraseOrKey,
okLabel: L10n.of(context).ok,
);
}
}
}
@override
Widget build(BuildContext context) {
final client = Matrix.of(context).client;