Exired entries and groups now get updates at runtime

This commit is contained in:
michael starke
2014-08-26 18:58:27 +02:00
parent 9e2345bcd7
commit f322c44fdf
5 changed files with 27 additions and 15 deletions

View File

@@ -37,6 +37,7 @@
#import "KPKNode+IconImage.h"
#import "KPKAttribute.h"
#import "KPKTimeInfo.h"
#import "KPKMetaData.h"
#import "HNHTableHeaderCell.h"
#import "HNHGradientView.h"
@@ -46,6 +47,7 @@
#import "NSString+Commands.h"
#define STATUS_BAR_ANIMATION_TIME 0.15
#define EXPIRED_ENTRY_REFRESH_SECONDS 60
typedef NS_ENUM(NSUInteger,MPOVerlayInfoType) {
MPOverlayInfoPassword,
@@ -115,6 +117,7 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
_dataSource.viewController = self;
_menuDelegate = [[MPEntryContextMenuDelegate alloc] init];
_contextBarViewController = [[MPContextBarViewController alloc] init];
[self _updateExpirationDisplay];
}
return self;
}
@@ -728,4 +731,12 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
break;
}
}
- (void)_updateExpirationDisplay {
/* 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