fix timer stuffs
This commit is contained in:
parent
aed1cf1270
commit
221d6c275b
|
@ -406,7 +406,6 @@ class KeyVerification {
|
||||||
|
|
||||||
Future<void> maybeRequestSSSSSecrets([int i = 0]) async {
|
Future<void> maybeRequestSSSSSecrets([int i = 0]) async {
|
||||||
final requestInterval = <int>[10, 60];
|
final requestInterval = <int>[10, 60];
|
||||||
print('Attempting to request ssss secrets...');
|
|
||||||
if ((!encryption.crossSigning.enabled ||
|
if ((!encryption.crossSigning.enabled ||
|
||||||
(encryption.crossSigning.enabled &&
|
(encryption.crossSigning.enabled &&
|
||||||
(await encryption.crossSigning.isCached()))) &&
|
(await encryption.crossSigning.isCached()))) &&
|
||||||
|
@ -414,12 +413,11 @@ class KeyVerification {
|
||||||
(encryption.keyManager.enabled &&
|
(encryption.keyManager.enabled &&
|
||||||
(await encryption.keyManager.isCached())))) {
|
(await encryption.keyManager.isCached())))) {
|
||||||
// no need to request cache, we already have it
|
// no need to request cache, we already have it
|
||||||
print('Not needed, we already have them');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
unawaited(encryption.ssss.maybeRequestAll(
|
unawaited(encryption.ssss.maybeRequestAll(
|
||||||
_verifiedDevices.whereType<DeviceKeys>().toList()));
|
_verifiedDevices.whereType<DeviceKeys>().toList()));
|
||||||
if (requestInterval.length >= i) {
|
if (requestInterval.length <= i) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Timer(Duration(seconds: requestInterval[i]), () => maybeRequestSSSSSecrets(i + 1));
|
Timer(Duration(seconds: requestInterval[i]), () => maybeRequestSSSSSecrets(i + 1));
|
||||||
|
|
Loading…
Reference in a new issue