Skip to content

Commit b23fffc

Browse files
committed
fix(Profile): Not switching all devices
Fixes #1126
1 parent 5a0acf2 commit b23fffc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

SoundSwitch/Framework/NotificationManager/Notification/NotificationBanner.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void NotifyProfileChanged(Profile.Profile profile, Bitmap icon, uint? pro
4444
Priority = 1,
4545
Image = icon,
4646
Title = string.Format(SettingsStrings.profile_notification_text, profile.Name),
47-
Text = string.Join("\n", profile.Devices.Select(wrapper => wrapper.DeviceInfo.NameClean))
47+
Text = string.Join("\n", profile.Devices.Select(wrapper => wrapper.DeviceInfo.NameClean).Distinct())
4848
};
4949
_bannerManager.ShowNotification(bannerData);
5050
}

SoundSwitch/Framework/Profile/Profile.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ internal IEnumerable<DeviceRoleWrapper> Devices
9999
get
100100
{
101101
if (Playback != null)
102-
yield return new DeviceRoleWrapper(Playback, Playback.Equals(Communication) ? ERole.ERole_enum_count : ERole.eConsole | ERole.eMultimedia);
103-
if (Communication != null && !Communication.Equals(Playback))
102+
yield return new DeviceRoleWrapper(Playback, ERole.eConsole | ERole.eMultimedia);
103+
if (Communication != null)
104104
yield return new DeviceRoleWrapper(Communication, ERole.eCommunications);
105105
if (Recording != null)
106-
yield return new DeviceRoleWrapper(Recording, Recording.Equals(RecordingCommunication) ? ERole.ERole_enum_count : ERole.eConsole | ERole.eMultimedia);
107-
if (RecordingCommunication != null && !RecordingCommunication.Equals(Recording))
106+
yield return new DeviceRoleWrapper(Recording, ERole.eConsole | ERole.eMultimedia);
107+
if (RecordingCommunication != null)
108108
yield return new DeviceRoleWrapper(RecordingCommunication, ERole.eCommunications);
109109
}
110110
}

0 commit comments

Comments
 (0)