Kdb handling optimized

This commit is contained in:
michael starke
2013-07-31 03:23:29 +02:00
parent 8efcd79581
commit 83eb0edad2

View File

@@ -356,6 +356,9 @@ typedef NS_ENUM(NSUInteger, MPAlertType) {
- (KdbGroup *)templates {
static KdbGroup *_templates = nil;
if(self.version == MPDatabaseVersion3) {
return nil;
}
BOOL templateValid = [((Kdb4Group *)_templates).uuid isEqual:self.treeV4.entryTemplatesGroup];
if(!templateValid) {
_templates = [self findGroup:self.treeV4.entryTemplatesGroup];
@@ -364,6 +367,9 @@ typedef NS_ENUM(NSUInteger, MPAlertType) {
}
- (BOOL)isItemTrashed:(id)item {
if(self.version == MPDatabaseVersion3) {
return NO;
}
BOOL validItem = [item isKindOfClass:[KdbEntry class]] || [item isKindOfClass:[KdbGroup class]];
if(!item) {
return NO;