[studio/applib] Make navigateTo handle UUID paths
This commit is contained in:
parent
626da322d9
commit
3c2a6b047e
@ -31,7 +31,15 @@ static bool shutdownHandler(turbine::Context &ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void navigateTo(Context &ctx, ox::StringParam filePath, ox::StringParam navArgs) noexcept {
|
void navigateTo(Context &ctx, ox::StringParam filePath, ox::StringParam navArgs) noexcept {
|
||||||
ctx.ui.navigateTo(std::move(filePath), std::move(navArgs));
|
ox::String path = std::move(filePath);
|
||||||
|
if (beginsWith(path, "uuid://")) {
|
||||||
|
auto [p, err] = keel::uuidUrlToPath(keelCtx(ctx), path);
|
||||||
|
if (err) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
path = p;
|
||||||
|
}
|
||||||
|
ctx.ui.navigateTo(std::move(path), std::move(navArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ig {
|
namespace ig {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user