mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 07:02:39 +00:00
Kdb handling optimized
This commit is contained in:
@@ -356,6 +356,9 @@ typedef NS_ENUM(NSUInteger, MPAlertType) {
|
|||||||
|
|
||||||
- (KdbGroup *)templates {
|
- (KdbGroup *)templates {
|
||||||
static KdbGroup *_templates = nil;
|
static KdbGroup *_templates = nil;
|
||||||
|
if(self.version == MPDatabaseVersion3) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
BOOL templateValid = [((Kdb4Group *)_templates).uuid isEqual:self.treeV4.entryTemplatesGroup];
|
BOOL templateValid = [((Kdb4Group *)_templates).uuid isEqual:self.treeV4.entryTemplatesGroup];
|
||||||
if(!templateValid) {
|
if(!templateValid) {
|
||||||
_templates = [self findGroup:self.treeV4.entryTemplatesGroup];
|
_templates = [self findGroup:self.treeV4.entryTemplatesGroup];
|
||||||
@@ -364,6 +367,9 @@ typedef NS_ENUM(NSUInteger, MPAlertType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isItemTrashed:(id)item {
|
- (BOOL)isItemTrashed:(id)item {
|
||||||
|
if(self.version == MPDatabaseVersion3) {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
BOOL validItem = [item isKindOfClass:[KdbEntry class]] || [item isKindOfClass:[KdbGroup class]];
|
BOOL validItem = [item isKindOfClass:[KdbEntry class]] || [item isKindOfClass:[KdbGroup class]];
|
||||||
if(!item) {
|
if(!item) {
|
||||||
return NO;
|
return NO;
|
||||||
|
|||||||
Reference in New Issue
Block a user