From 0107ad88f30e19883cca41fc2d8533a7fe92c437 Mon Sep 17 00:00:00 2001 From: 409 Date: Mon, 1 Jul 2024 13:26:08 +0200 Subject: [PATCH] Squashed commit of the following: commit edef92290282f06e2d808127f574774f0c4ae50b Author: 409 Date: Mon Jul 1 13:22:02 2024 +0200 feat: automatically select new sink input if the current selection is none --- src/mixer.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mixer.rs b/src/mixer.rs index ce1be16..d58a4d5 100644 --- a/src/mixer.rs +++ b/src/mixer.rs @@ -237,6 +237,10 @@ impl Mixer { let sink_input = result.lock().unwrap().take(); if let Some(sink_input) = sink_input { self.sink_inputs.insert(sink_index, sink_input); + + if self.selected_index.lock().unwrap().is_none() { + self.select_next(); + } } } PulseInstruction::RemoveSinkInput(sink_index) => {