Hopefully fixed issue with rendering maximum security cells re-used from "new site" cells.
[FIXED] When a "new site" cell gets recycled as a "maximum security" entity's cell, we may not be able to scroll to the cell index for the type because the collection view's cell indexes weren't updated yet.
This commit is contained in:
2
External/LoveLyndir
vendored
2
External/LoveLyndir
vendored
Submodule External/LoveLyndir updated: ceed9e2000...c2a728dab3
2
External/Pearl
vendored
2
External/Pearl
vendored
Submodule External/Pearl updated: daa260b3ec...c900030991
@@ -16,7 +16,7 @@ static NSDictionary *keyQuery(MPUserEntity *user) {
|
|||||||
return [PearlKeyChain createQueryForClass:kSecClassGenericPassword
|
return [PearlKeyChain createQueryForClass:kSecClassGenericPassword
|
||||||
attributes:@{
|
attributes:@{
|
||||||
(__bridge id)kSecAttrService : @"Saved Master Password",
|
(__bridge id)kSecAttrService : @"Saved Master Password",
|
||||||
(__bridge id)kSecAttrAccount : IfNotNilElse( user.name, @"" )
|
(__bridge id)kSecAttrAccount : user.name?: @""
|
||||||
}
|
}
|
||||||
matches:nil];
|
matches:nil];
|
||||||
}
|
}
|
||||||
|
@@ -430,7 +430,7 @@ PearlAssociatedObjectProperty( NSManagedObjectContext*, MainManagedObjectContext
|
|||||||
@"cause" : @(cause),
|
@"cause" : @(cause),
|
||||||
@"error.code" : @(error.code),
|
@"error.code" : @(error.code),
|
||||||
@"error.domain" : NilToNSNull( error.domain ),
|
@"error.domain" : NilToNSNull( error.domain ),
|
||||||
@"error.reason" : NilToNSNull( IfNotNilElse( [error localizedFailureReason], [error localizedDescription] ) ),
|
@"error.reason" : NilToNSNull( [error localizedFailureReason]?: [error localizedDescription] ),
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -186,7 +186,7 @@
|
|||||||
|
|
||||||
- (MPElementType)defaultType {
|
- (MPElementType)defaultType {
|
||||||
|
|
||||||
return IfElse((MPElementType)[self.defaultType_ unsignedIntegerValue], MPElementTypeGeneratedLong);
|
return (MPElementType)[self.defaultType_ unsignedIntegerValue]?: MPElementTypeGeneratedLong;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDefaultType:(MPElementType)aDefaultType {
|
- (void)setDefaultType:(MPElementType)aDefaultType {
|
||||||
|
@@ -230,7 +230,8 @@
|
|||||||
|
|
||||||
if (self.transientSite)
|
if (self.transientSite)
|
||||||
PearlMainQueue( ^{
|
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 section = 0; section < [self.contentCollectionView numberOfSections]; ++section)
|
||||||
for (NSInteger item = 0; item < [self.contentCollectionView numberOfItemsInSection:section]; ++item)
|
for (NSInteger item = 0; item < [self.contentCollectionView numberOfItemsInSection:section]; ++item)
|
||||||
@@ -242,7 +243,7 @@
|
|||||||
[MPiOSAppDelegate managedObjectContextForMainThreadPerformBlockAndWait:^(NSManagedObjectContext *mainContext) {
|
[MPiOSAppDelegate managedObjectContextForMainThreadPerformBlockAndWait:^(NSManagedObjectContext *mainContext) {
|
||||||
MPElementEntity *mainElement = [self mainElement];
|
MPElementEntity *mainElement = [self mainElement];
|
||||||
|
|
||||||
self.algorithm = IfNotNilElse( mainElement.algorithm, MPAlgorithmDefault );
|
self.algorithm = mainElement.algorithm?: MPAlgorithmDefault;
|
||||||
self.activeType = mainElement.type;
|
self.activeType = mainElement.type;
|
||||||
|
|
||||||
for (NSInteger section = 0; section < [self.contentCollectionView numberOfSections]; ++section)
|
for (NSInteger section = 0; section < [self.contentCollectionView numberOfSections]; ++section)
|
||||||
@@ -374,9 +375,6 @@
|
|||||||
|
|
||||||
- (void)setAlgorithm:(id<MPAlgorithm>)algorithm {
|
- (void)setAlgorithm:(id<MPAlgorithm>)algorithm {
|
||||||
|
|
||||||
if ([_algorithm isEqual:algorithm])
|
|
||||||
return;
|
|
||||||
|
|
||||||
_algorithm = algorithm;
|
_algorithm = algorithm;
|
||||||
|
|
||||||
[self.contentCollectionView reloadData];
|
[self.contentCollectionView reloadData];
|
||||||
|
Reference in New Issue
Block a user