maybeRequestSSSSSecrets method
Future<void>
maybeRequestSSSSSecrets(
[ - int i = 0
])
Implementation
Future<void> maybeRequestSSSSSecrets([int i = 0]) async {
final requestInterval = <int>[10, 60];
if ((!encryption.crossSigning.enabled ||
(encryption.crossSigning.enabled &&
(await encryption.crossSigning.isCached()))) &&
(!encryption.keyManager.enabled ||
(encryption.keyManager.enabled &&
(await encryption.keyManager.isCached())))) {
// no need to request cache, we already have it
return;
}
// ignore: unawaited_futures
encryption.ssss
.maybeRequestAll(_verifiedDevices.whereType<DeviceKeys>().toList());
if (requestInterval.length <= i) {
return;
}
Timer(
Duration(seconds: requestInterval[i]),
() => maybeRequestSSSSSecrets(i + 1),
);
}