mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-16 00:51:02 +02:00
refactor: pass context into modules controllers
This paves the way to keep things tidier for the next refactors.
This commit is contained in:
parent
651a27b143
commit
57b57ed002
13 changed files with 30 additions and 20 deletions
|
@ -168,10 +168,11 @@ impl Module<MenuBar> for TrayModule {
|
|||
fn spawn_controller(
|
||||
&self,
|
||||
_info: &ModuleInfo,
|
||||
tx: Sender<ModuleUpdateEvent<Self::SendMessage>>,
|
||||
context: &WidgetContext<Self::SendMessage, Self::ReceiveMessage>,
|
||||
mut rx: Receiver<Self::ReceiveMessage>,
|
||||
) -> Result<()> {
|
||||
let client = await_sync(async { get_tray_event_client().await });
|
||||
let tx = context.tx.clone();
|
||||
let (tray_tx, mut tray_rx) = client.subscribe();
|
||||
|
||||
// listen to tray updates
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue