Reduce platform legacy adapter tail

This commit is contained in:
2026-06-13 19:12:18 +02:00
parent 3c6fd00ae3
commit 6ba98eea70
5 changed files with 78 additions and 22 deletions

View File

@@ -636,32 +636,12 @@ public:
void display_file(std::string_view path) override
{
const std::string value(path);
#ifdef __IOS__
dispatch_async(dispatch_get_main_queue(), ^{
[App::I->ios_view display_file:value];
});
#elif __OSX__
[[NSWorkspace sharedWorkspace] openFile:[NSString stringWithUTF8String:value.c_str()]];
#else
(void)value;
#endif
active_apple_document_platform_services().display_file(path);
}
void share_file(std::string_view path) override
{
const std::string value(path);
#ifdef __IOS__
dispatch_async(dispatch_get_main_queue(), ^{
[App::I->ios_view share_file:[NSString stringWithUTF8String:value.c_str()]];
});
#elif __OSX__
dispatch_async(dispatch_get_main_queue(), ^{
[App::I->osx_view share_file:[NSString stringWithUTF8String:value.c_str()]];
});
#else
(void)value;
#endif
active_apple_document_platform_services().share_file(path);
}
void request_app_close() override