Fixed leaking isseu with timed expired update

This commit is contained in:
michael starke
2015-07-09 16:07:21 +02:00
parent 1b43134611
commit 5974c7599b
4 changed files with 3 additions and 27 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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