mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-02-01 15:49:10 +00:00
linux-rust: fix conv-detect toggle in tray menu
This commit is contained in:
@@ -110,14 +110,16 @@ impl ksni::Tray for MyTray {
|
||||
activate: Box::new(|this: &mut Self| {
|
||||
if let Some(tx) = &this.command_tx {
|
||||
if let Some(is_enabled) = this.conversation_detect_enabled {
|
||||
let value = if is_enabled { 0x02 } else { 0x01 };
|
||||
let new_state = !is_enabled;
|
||||
let value = if !new_state { 0x02 } else { 0x01 };
|
||||
let _ = tx.send((ControlCommandIdentifiers::ConversationDetectConfig, vec![value]));
|
||||
this.conversation_detect_enabled = Some(new_state);
|
||||
}
|
||||
}
|
||||
}),
|
||||
..Default::default()
|
||||
}
|
||||
.into(),
|
||||
.into(),
|
||||
StandardItem {
|
||||
label: "Exit".into(),
|
||||
icon_name: "application-exit".into(),
|
||||
|
||||
Reference in New Issue
Block a user