diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart index 02e02a8ba..74d037870 100644 --- a/flutter/lib/models/model.dart +++ b/flutter/lib/models/model.dart @@ -1660,6 +1660,7 @@ class ElevationModel with ChangeNotifier { bool get showRequestMenu => _canElevate && !_running; onPeerInfo(PeerInfo pi) { _canElevate = pi.platform == kPeerPlatformWindows && pi.sasEnabled == false; + _running = false; } onPortableServiceRunning(Map evt) { diff --git a/src/server/connection.rs b/src/server/connection.rs index 2723b0834..a14fe07e0 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -2379,8 +2379,8 @@ impl Connection { )); if self.authorized { let p = &mut self.portable; - if running != p.last_running { - p.last_running = running; + if Some(running) != p.last_running { + p.last_running = Some(running); let mut misc = Misc::new(); misc.set_portable_service_running(running); let mut msg = Message::new(); @@ -2660,7 +2660,7 @@ pub enum FileAuditType { pub struct PortableState { pub last_uac: bool, pub last_foreground_window_elevated: bool, - pub last_running: bool, + pub last_running: Option, pub is_installed: bool, }