diff --git a/bin/darkwallet/src/prop/mod.rs b/bin/darkwallet/src/prop/mod.rs index 8a494dd4d..d747697d1 100644 --- a/bin/darkwallet/src/prop/mod.rs +++ b/bin/darkwallet/src/prop/mod.rs @@ -74,7 +74,7 @@ pub enum PropertySubType { ResourceId = 3, } -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, PartialEq)] pub enum Role { User = 0, App = 1, diff --git a/bin/darkwallet/src/ui/mod.rs b/bin/darkwallet/src/ui/mod.rs index 38f5a62f0..8ee98abca 100644 --- a/bin/darkwallet/src/ui/mod.rs +++ b/bin/darkwallet/src/ui/mod.rs @@ -23,7 +23,7 @@ use crate::{ error::{Error, Result}, expr::{SExprMachine, SExprVal}, gfx2::{DrawCall, Rectangle}, - prop::PropertyPtr, + prop::{PropertyPtr, Role}, scene::{SceneGraph, SceneNode, SceneNodeId, SceneNodeType}, }; @@ -84,7 +84,15 @@ impl OnModify { let me = self.me.clone(); let task = self.ex.spawn(async move { loop { - let _ = on_modify_sub.receive().await; + let Ok((role, _)) = on_modify_sub.receive().await else { + error!(target: "app", "Property '{}':{}/'{}' on_modify pipe is broken", node_name, node_id, prop_name); + return + }; + + if role == Role::Internal { + continue + } + debug!(target: "app", "Property '{}':{}/'{}' modified", node_name, node_id, prop_name); let Some(self_) = me.upgrade() else {