Skip to content

Commit 009475b

Browse files
committed
fix(Profile::Hotkey): Fix the cycling logic between profiles
Profile also use QuickMenu when activated. Fixes #734
1 parent 5a66489 commit 009475b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SoundSwitch/Framework/Profile/Hotkey/ProfileHotkeyManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ private record HotKeysSelection(HashSet<Profile> Profiles)
1717

1818
internal bool HasOnlyOne => Profiles.Count == 1;
1919

20-
public Profile NextOne() => Profiles.FirstOrDefault(profile => profile != LastUsed) ?? Profiles.Last();
20+
public Profile NextOne() => Profiles.SkipWhile(profile => profile != LastUsed).Skip(1).FirstOrDefault() ?? Profiles.First();
2121
};
2222

2323
private class HotKeyItem : IconMenuItem<Profile>.DataContainer

0 commit comments

Comments
 (0)