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,6 +146,8 @@ public partial class DeviceListViewModel : ViewModelBase
|
|||||||
|
|
||||||
Devices = [];
|
Devices = [];
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
|
{
|
||||||
foreach(DeviceInfo device in devices)
|
foreach(DeviceInfo device in devices)
|
||||||
{
|
{
|
||||||
Devices.Add(new DeviceModel
|
Devices.Add(new DeviceModel
|
||||||
@@ -158,6 +160,7 @@ public partial class DeviceListViewModel : ViewModelBase
|
|||||||
Vendor = device.Vendor
|
Vendor = device.Vendor
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch(SocketException ex)
|
catch(SocketException ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user