E2E keys export: Add an "Export keys" button to the settings

Use short version of NSTimer usage
This commit is contained in:
manuroe
2017-02-06 14:24:49 +01:00
parent e4357f6685
commit 421bcd4084
@@ -2254,13 +2254,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
// We use [UIDocumentInteractionControllerDelegate didEndSendingToApplication] for that
// but it is not reliable for all cases (see http://stackoverflow.com/a/21867096).
// So, arm a timer to auto delete the file after 10mins.
keyExportsFileDeletionTimer = [[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:(10 * 60)]
interval:0
target:self
selector:@selector(deleteKeyExportFile)
userInfo:nil
repeats:NO];
[[NSRunLoop mainRunLoop] addTimer:keyExportsFileDeletionTimer forMode:NSDefaultRunLoopMode];
keyExportsFileDeletionTimer = [NSTimer scheduledTimerWithTimeInterval:600 target:self selector:@selector(deleteKeyExportFile) userInfo:self repeats:NO];
}
else
{