Skip to content

Commit

Permalink
fix(Profile): Not switching all devices
Browse files Browse the repository at this point in the history
Fixes #1126
  • Loading branch information
Belphemur committed Mar 26, 2023
1 parent 5a0acf2 commit b23fffc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void NotifyProfileChanged(Profile.Profile profile, Bitmap icon, uint? pro
Priority = 1,
Image = icon,
Title = string.Format(SettingsStrings.profile_notification_text, profile.Name),
Text = string.Join("\n", profile.Devices.Select(wrapper => wrapper.DeviceInfo.NameClean))
Text = string.Join("\n", profile.Devices.Select(wrapper => wrapper.DeviceInfo.NameClean).Distinct())
};
_bannerManager.ShowNotification(bannerData);
}
Expand Down
8 changes: 4 additions & 4 deletions SoundSwitch/Framework/Profile/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ internal IEnumerable<DeviceRoleWrapper> Devices
get
{
if (Playback != null)
yield return new DeviceRoleWrapper(Playback, Playback.Equals(Communication) ? ERole.ERole_enum_count : ERole.eConsole | ERole.eMultimedia);
if (Communication != null && !Communication.Equals(Playback))
yield return new DeviceRoleWrapper(Playback, ERole.eConsole | ERole.eMultimedia);
if (Communication != null)
yield return new DeviceRoleWrapper(Communication, ERole.eCommunications);
if (Recording != null)
yield return new DeviceRoleWrapper(Recording, Recording.Equals(RecordingCommunication) ? ERole.ERole_enum_count : ERole.eConsole | ERole.eMultimedia);
if (RecordingCommunication != null && !RecordingCommunication.Equals(Recording))
yield return new DeviceRoleWrapper(Recording, ERole.eConsole | ERole.eMultimedia);
if (RecordingCommunication != null)
yield return new DeviceRoleWrapper(RecordingCommunication, ERole.eCommunications);
}
}
Expand Down

0 comments on commit b23fffc

Please sign in to comment.