2
0

Improve support for import/export headers on iOS/Mac.

[ADDED]     iOS/macOS support for Full Name, Algorithm and Default Type mpsites headers.
This commit is contained in:
Maarten Billemont
2017-04-19 21:58:10 -04:00
parent c99252809d
commit d9bd604436
6 changed files with 46 additions and 29 deletions

View File

@@ -237,8 +237,8 @@
// Invalid self.user.defaultType
result = MPApplyFix( result, ^MPFixableResult {
wrn( @"Invalid type for: %@ of %@, type: %ld. Will use %ld instead.",
self.name, self.user.name, (long)self.type, (long)MPSiteTypeGeneratedLong );
self.type = MPSiteTypeGeneratedLong;
self.name, self.user.name, (long)self.type, (long)[self.algorithm defaultType] );
self.type = [self.algorithm defaultType];
return MPFixableResultProblemsFixed;
} );
if (![self isKindOfClass:[self.algorithm classOfType:self.type]])
@@ -330,7 +330,7 @@
- (MPSiteType)defaultType {
return (MPSiteType)[self.defaultType_ unsignedIntegerValue]?: MPSiteTypeGeneratedLong;
return (MPSiteType)[self.defaultType_ unsignedIntegerValue]?: self.algorithm.defaultType;
}
- (void)setDefaultType:(MPSiteType)aDefaultType {