mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Ensure devices list is filled in UI thread.
This commit is contained in:
@@ -146,18 +146,21 @@ public partial class DeviceListViewModel : ViewModelBase
|
|||||||
|
|
||||||
Devices = [];
|
Devices = [];
|
||||||
|
|
||||||
foreach(DeviceInfo device in devices)
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
{
|
{
|
||||||
Devices.Add(new DeviceModel
|
foreach(DeviceInfo device in devices)
|
||||||
{
|
{
|
||||||
Bus = device.Bus,
|
Devices.Add(new DeviceModel
|
||||||
Model = device.Model,
|
{
|
||||||
Path = device.Path,
|
Bus = device.Bus,
|
||||||
Serial = device.Serial,
|
Model = device.Model,
|
||||||
Supported = device.Supported,
|
Path = device.Path,
|
||||||
Vendor = device.Vendor
|
Serial = device.Serial,
|
||||||
});
|
Supported = device.Supported,
|
||||||
}
|
Vendor = device.Vendor
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch(SocketException ex)
|
catch(SocketException ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user