mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 07:02:39 +00:00
Fixed leaking isseu with timed expired update
This commit is contained in:
Submodule KeePassKit updated: 0801b18e5f...30e720eec2
@@ -118,7 +118,6 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
_dataSource.viewController = self;
|
||||
_menuDelegate = [[MPEntryContextMenuDelegate alloc] init];
|
||||
_contextBarViewController = [[MPContextBarViewController alloc] init];
|
||||
[self _updateExpirationDisplay];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -737,16 +736,4 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark periodic UI Update
|
||||
|
||||
- (void)_updateExpirationDisplay {
|
||||
return;
|
||||
/* items are all entries */
|
||||
[[self.entryArrayController arrangedObjects] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
[[obj timeInfo] isExpired];
|
||||
}];
|
||||
[self performSelector:@selector(_updateExpirationDisplay) withObject:nil afterDelay:EXPIRED_ENTRY_REFRESH_SECONDS];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -110,8 +110,6 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
||||
[self bind:NSStringFromSelector(@selector(databaseNameWrapper)) toObject:document.tree.metaData withKeyPath:NSStringFromSelector(@selector(databaseName)) options:nil];
|
||||
[_outlineView setDataSource:self.datasource];
|
||||
_bindingEstablished = YES;
|
||||
[self _updateExpirationDisplay];
|
||||
|
||||
}
|
||||
NSTreeNode *node = [_outlineView itemAtRow:0];
|
||||
[self _expandItems:node];
|
||||
@@ -299,14 +297,4 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
|
||||
return [node isKindOfClass:[KPKTree class]];
|
||||
}
|
||||
|
||||
- (void)_updateExpirationDisplay {
|
||||
return;
|
||||
MPDocument *document = [[self windowController] document];
|
||||
[document.root.timeInfo isExpired];
|
||||
[[document.tree allGroups] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
[[obj timeInfo] isExpired];
|
||||
}];
|
||||
[self performSelector:@selector(_updateExpirationDisplay) withObject:nil afterDelay:EXPIRED_GROUP_REFRESH_SECONDS];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MPViewController.h"
|
||||
#import "MPDocument.h"
|
||||
|
||||
@implementation MPViewController
|
||||
|
||||
@@ -21,7 +22,7 @@
|
||||
}
|
||||
|
||||
- (NSWindowController *)windowController {
|
||||
return [self.view.window windowController];
|
||||
return self.view.window.windowController;
|
||||
}
|
||||
|
||||
#pragma mark Responder Chain
|
||||
|
||||
Reference in New Issue
Block a user