2
0

fixup! Support for unset login type.

This commit is contained in:
Maarten Billemont 2021-11-01 20:52:04 -04:00
parent 0b45dc584f
commit f27607e63c

View File

@ -146,10 +146,10 @@ static NSOperationQueue *_mpwQueue = nil;
- (NSString *)nameOfType:(MPResultType)type {
if (!type)
return nil;
switch (type) {
case MPResultTypeNone:
return @"None";
case MPResultTypeTemplateMaximum:
return @"Maximum Security Password";
@ -189,10 +189,10 @@ static NSOperationQueue *_mpwQueue = nil;
- (NSString *)shortNameOfType:(MPResultType)type {
if (!type)
return nil;
switch (type) {
case MPResultTypeNone:
return @"None";
case MPResultTypeTemplateMaximum:
return @"Maximum";
@ -237,9 +237,6 @@ static NSOperationQueue *_mpwQueue = nil;
- (Class)classOfType:(MPResultType)type {
if (!type)
Throw( @"No type given." );
switch (type) {
case MPResultTypeTemplateMaximum:
return [MPGeneratedSiteEntity class];
@ -271,6 +268,7 @@ static NSOperationQueue *_mpwQueue = nil;
case MPResultTypeStatefulDevice:
return [MPStoredSiteEntity class];
case MPResultTypeNone:
case MPResultTypeDeriveKey:
break;
}
@ -322,6 +320,7 @@ static NSOperationQueue *_mpwQueue = nil;
return MPResultTypeStatefulDevice;
case MPResultTypeStatefulDevice:
return MPResultTypeTemplatePhrase;
case MPResultTypeNone:
case MPResultTypeDeriveKey:
break;
}
@ -531,8 +530,13 @@ static NSOperationQueue *_mpwQueue = nil;
return;
}
case MPResultTypeDeriveKey:
case MPResultTypeNone:
case MPResultTypeDeriveKey: {
PearlNotMainQueue( ^{
resultBlock( nil );
} );
return;
}
}
Throw( @"Type not supported: %lu", (long)type );