2
0

Merge branch 'crashlytics-198'

Conflicts:
	External/Pearl
This commit is contained in:
Maarten Billemont 2014-06-05 22:03:32 -04:00
commit 25df56f90a
5 changed files with 7 additions and 9 deletions

2
External/Pearl vendored

@ -1 +1 @@
Subproject commit 0e9484b6512150fbbfffdddcdec62f8e9a741254
Subproject commit c9000309913081119803fdd1c2106e371c1b594a

View File

@ -16,7 +16,7 @@ static NSDictionary *keyQuery(MPUserEntity *user) {
return [PearlKeyChain createQueryForClass:kSecClassGenericPassword
attributes:@{
(__bridge id)kSecAttrService : @"Saved Master Password",
(__bridge id)kSecAttrAccount : IfNotNilElse( user.name, @"" )
(__bridge id)kSecAttrAccount : user.name?: @""
}
matches:nil];
}

View File

@ -430,7 +430,7 @@ PearlAssociatedObjectProperty( NSManagedObjectContext*, MainManagedObjectContext
@"cause" : @(cause),
@"error.code" : @(error.code),
@"error.domain" : NilToNSNull( error.domain ),
@"error.reason" : NilToNSNull( IfNotNilElse( [error localizedFailureReason], [error localizedDescription] ) ),
@"error.reason" : NilToNSNull( [error localizedFailureReason]?: [error localizedDescription] ),
} );
}

View File

@ -186,7 +186,7 @@
- (MPElementType)defaultType {
return IfElse((MPElementType)[self.defaultType_ unsignedIntegerValue], MPElementTypeGeneratedLong);
return (MPElementType)[self.defaultType_ unsignedIntegerValue]?: MPElementTypeGeneratedLong;
}
- (void)setDefaultType:(MPElementType)aDefaultType {

View File

@ -230,7 +230,8 @@
if (self.transientSite)
PearlMainQueue( ^{
self.activeType = IfElse( [[MPiOSAppDelegate get] activeUserForMainThread].defaultType, MPElementTypeGeneratedLong );
self.algorithm = MPAlgorithmDefault;
self.activeType = [[MPiOSAppDelegate get] activeUserForMainThread].defaultType?: MPElementTypeGeneratedLong;
for (NSInteger section = 0; section < [self.contentCollectionView numberOfSections]; ++section)
for (NSInteger item = 0; item < [self.contentCollectionView numberOfItemsInSection:section]; ++item)
@ -242,7 +243,7 @@
[MPiOSAppDelegate managedObjectContextForMainThreadPerformBlockAndWait:^(NSManagedObjectContext *mainContext) {
MPElementEntity *mainElement = [self mainElement];
self.algorithm = IfNotNilElse( mainElement.algorithm, MPAlgorithmDefault );
self.algorithm = mainElement.algorithm?: MPAlgorithmDefault;
self.activeType = mainElement.type;
for (NSInteger section = 0; section < [self.contentCollectionView numberOfSections]; ++section)
@ -374,9 +375,6 @@
- (void)setAlgorithm:(id<MPAlgorithm>)algorithm {
if ([_algorithm isEqual:algorithm])
return;
_algorithm = algorithm;
[self.contentCollectionView reloadData];