desktop_entries: Fix activate context

This commit is contained in:
Victoria Brekenfeld 2024-02-01 19:10:34 +01:00
parent 091581c362
commit 61cfe87e94

View file

@ -237,14 +237,11 @@ impl<W: AsyncWrite + Unpin> App<W> {
} }
}; };
let response = match context { let response = PluginResponse::DesktopEntry {
0 => PluginResponse::DesktopEntry { path: entry.path.clone(),
path: entry.path.clone(), gpu_preference,
gpu_preference, action_name: (is_cosmic && context >= gpu_len)
action_name: (is_cosmic && context >= gpu_len) .then(|| entry.actions[(context - gpu_len) as usize].clone()),
.then(|| entry.actions[(context - gpu_len) as usize].clone()),
},
_ => return,
}; };
send(&mut self.tx, response).await; send(&mut self.tx, response).await;