fix(web): omit desktop exit guards from wasm
This commit is contained in:
parent
dd953287d6
commit
ec5ba7fcd6
@ -125,6 +125,7 @@ pub fn guard_window_close(app: &mut PhotocraftApp, ctx: &egui::Context) {
|
|||||||
if !ctx.input(|i| i.viewport().close_requested()) {
|
if !ctx.input(|i| i.viewport().close_requested()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
if crate::jiansun::guard_production_exit(app, ctx) {
|
if crate::jiansun::guard_production_exit(app, ctx) {
|
||||||
ctx.send_viewport_cmd(egui::ViewportCommand::CancelClose);
|
ctx.send_viewport_cmd(egui::ViewportCommand::CancelClose);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -45,6 +45,7 @@ pub fn invoke(app: &mut PhotocraftApp, ctx: &egui::Context, id: &str, params: Va
|
|||||||
{
|
{
|
||||||
authorize(id, ¶ms)?;
|
authorize(id, ¶ms)?;
|
||||||
}
|
}
|
||||||
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
if id == "file.exit" && crate::jiansun::guard_production_exit(app, ctx) {
|
if id == "file.exit" && crate::jiansun::guard_production_exit(app, ctx) {
|
||||||
return Ok(Value::Null);
|
return Ok(Value::Null);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user