5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 22:49:31 +08:00

[mac] Attempt to fix 10.14 compilation issue

This commit is contained in:
Lea Anthony 2021-12-11 07:29:30 +11:00
parent 81b3ecb056
commit e12b630dfb
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -497,16 +497,16 @@
filters = [filters stringByReplacingOccurrencesOfString:@"*." withString:@""];
filters = [filters stringByReplacingOccurrencesOfString:@" " withString:@""];
NSArray *filterList = [filters componentsSeparatedByString:@";"];
if (@available(macOS 10.16, *)) {
#ifdef USE_NEW_FILTERS
NSMutableArray *contentTypes = [[NSMutableArray new] autorelease];
for (NSString *filter in filterList) {
UTType *t = [UTType typeWithFilenameExtension:filter];
[contentTypes addObject:t];
}
[dialog setAllowedContentTypes:contentTypes];
} else {
#else
[dialog setAllowedFileTypes:filterList];
}
#endif
} else {
[dialog setAllowsOtherFileTypes:true];
}