mirror of
https://github.com/MacPass/MacPass.git
synced 2026-01-30 16:48:17 +00:00
Draft for timeout
This commit is contained in:
@@ -293,6 +293,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey
|
|||||||
self.compositeKey = nil; // clear the key?
|
self.compositeKey = nil; // clear the key?
|
||||||
}
|
}
|
||||||
if(isUnlocked) {
|
if(isUnlocked) {
|
||||||
|
|
||||||
self.unlockCount += 1;
|
self.unlockCount += 1;
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidUnlockDatabaseNotification object:self];
|
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidUnlockDatabaseNotification object:self];
|
||||||
}
|
}
|
||||||
@@ -679,6 +680,17 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey
|
|||||||
}
|
}
|
||||||
[self.trash clear];
|
[self.trash clear];
|
||||||
}
|
}
|
||||||
|
# pragma mark Expiration updates
|
||||||
|
- (void)_updateExpirationState {
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(60*60*6* NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
/* TODO: find better way to do this! Test for alle entries if expired */
|
||||||
|
[[self.tree allEntries] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||||
|
KPKEntry *entry = obj;
|
||||||
|
[entry.timeInfo willChangeValueForKey:NSStringFromSelector(@selector(isExpired))];
|
||||||
|
[entry.timeInfo didChangeValueForKey:NSStringFromSelector(@selector(isExpired))];
|
||||||
|
}];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
# pragma mark File Watching
|
# pragma mark File Watching
|
||||||
- (void) _watchForFileChanges:(BOOL)watch {
|
- (void) _watchForFileChanges:(BOOL)watch {
|
||||||
|
|||||||
Reference in New Issue
Block a user