mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-02-10 19:52:24 +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| {
|
activate: Box::new(|this: &mut Self| {
|
||||||
if let Some(tx) = &this.command_tx {
|
if let Some(tx) = &this.command_tx {
|
||||||
if let Some(is_enabled) = this.conversation_detect_enabled {
|
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]));
|
let _ = tx.send((ControlCommandIdentifiers::ConversationDetectConfig, vec![value]));
|
||||||
|
this.conversation_detect_enabled = Some(new_state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
.into(),
|
.into(),
|
||||||
StandardItem {
|
StandardItem {
|
||||||
label: "Exit".into(),
|
label: "Exit".into(),
|
||||||
icon_name: "application-exit".into(),
|
icon_name: "application-exit".into(),
|
||||||
|
|||||||
Reference in New Issue
Block a user