Skip to content

Commit

Permalink
boost(DeviceCollection): Return device order by discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
Belphemur committed Jul 24, 2022
1 parent a78377c commit 0154286
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using SoundSwitch.Common.Framework.Audio.Device;

namespace SoundSwitch.Common.Framework.Audio.Collection;
Expand All @@ -26,7 +27,7 @@ public DeviceCollection(IEnumerable<T> deviceInfos)

public IEnumerator<T> GetEnumerator()
{
return _byId.Values.GetEnumerator();
return _byId.Values.OrderBy(info => info.DiscoveredAt).GetEnumerator();
}

IEnumerator IEnumerable.GetEnumerator()
Expand Down

0 comments on commit 0154286

Please sign in to comment.