mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
need this elsewhere
This commit is contained in:
1 parent
1d789bf23c
commit
906efdac98
5 files changed
+161
-167
No files matched your search
@@ -23,9 +23,11 @@ namespace Artemis.UI.Screens.Settings.Tabs.Devices
|
||||
protected override void OnActivate()
|
||||
{
|
||||
// Take it off the UI thread to avoid freezing on tab change
|
||||
Task.Run(() =>
|
||||
Task.Run(async () =>
|
||||
{
|
||||
Items.Clear();
|
||||
await Task.Delay(200);
|
||||
|
||||
var instances = _surfaceService.ActiveSurface.Devices.Select(d => _settingsVmFactory.CreateDeviceSettingsViewModel(d)).ToList();
|
||||
foreach (var deviceSettingsViewModel in instances)
|
||||
Items.Add(deviceSettingsViewModel);
|
||||
|
||||
@@ -23,10 +23,16 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
protected override void OnActivate()
|
||||
{
|
||||
// Take it off the UI thread to avoid freezing on tab change
|
||||
Items.Clear();
|
||||
var instances = _pluginService.GetAllPluginInfo().Select(p => _settingsVmFactory.CreatePluginSettingsViewModel(p.Instance)).ToList();
|
||||
foreach (var pluginSettingsViewModel in instances)
|
||||
Items.Add(pluginSettingsViewModel);
|
||||
Task.Run(async () =>
|
||||
{
|
||||
Items.Clear();
|
||||
await Task.Delay(200);
|
||||
|
||||
var instances = _pluginService.GetAllPluginInfo().Select(p => _settingsVmFactory.CreatePluginSettingsViewModel(p.Instance)).ToList();
|
||||
foreach (var pluginSettingsViewModel in instances)
|
||||
Items.Add(pluginSettingsViewModel);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user