screenreader: Always try to start/stop orca in set_enabled

This commit is contained in:
Vicki Pfau 2025-06-18 18:59:08 -07:00
parent f62aa583e1
commit 84371fcc4e

View file

@ -146,10 +146,7 @@ impl<'dbus> OrcaManager<'dbus> {
}
pub async fn set_enabled(&mut self, enable: bool) -> Result<()> {
if self.enabled == enable {
return Ok(());
}
if enable != self.enabled {
#[cfg(not(test))]
{
let a11ysettings = Settings::new(A11Y_SETTING);
@ -163,6 +160,7 @@ impl<'dbus> OrcaManager<'dbus> {
_ => return Err(e),
}
}
}
if enable {
self.restart_orca().await?;
} else {