Skip to content

Commit

Permalink
DeviceManager: Use if instead of else if
Browse files Browse the repository at this point in the history
  • Loading branch information
ryonakano committed Feb 20, 2024
1 parent 48bdf11 commit ce3c384
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Services/DeviceManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public class DeviceManager : Object {
default_source = device;
debug ("Default source: \"%s\"", default_source.display_name);
}
} else if (device.has_classes ("Sink")) {
}

if (device.has_classes ("Sink")) {
if (sinks.contains (device)) {
continue;
}
Expand All @@ -96,8 +98,6 @@ public class DeviceManager : Object {
default_sink = device;
debug ("Default sink: \"%s\"", default_sink.display_name);
}
} else {
assert_not_reached ();
}
}

Expand Down

0 comments on commit ce3c384

Please sign in to comment.