mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-04 20:21: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
|
@ -90,7 +90,7 @@ impl Module<gtk::Box> for LauncherModule {
|
|||
fn spawn_controller(
|
||||
&self,
|
||||
_info: &ModuleInfo,
|
||||
tx: mpsc::Sender<ModuleUpdateEvent<Self::SendMessage>>,
|
||||
context: &WidgetContext<Self::SendMessage, Self::ReceiveMessage>,
|
||||
mut rx: mpsc::Receiver<Self::ReceiveMessage>,
|
||||
) -> crate::Result<()> {
|
||||
let items = self
|
||||
|
@ -111,7 +111,7 @@ impl Module<gtk::Box> for LauncherModule {
|
|||
let items = arc_mut!(items);
|
||||
|
||||
let items2 = Arc::clone(&items);
|
||||
let tx2 = tx.clone();
|
||||
|
||||
spawn(async move {
|
||||
let items = items2;
|
||||
let tx = tx2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue