mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Modules UI - Fixed activation view not subscribing sometimes
Core - Don't attempt to catch a timeout during module override, only pain down that route
This commit is contained in:
parent
8d756128e4
commit
d62d389d9f
@ -44,12 +44,11 @@ namespace Artemis.Core.Services
|
|||||||
|
|
||||||
public async Task SetActiveModuleOverride(Module overrideModule)
|
public async Task SetActiveModuleOverride(Module overrideModule)
|
||||||
{
|
{
|
||||||
|
await ActiveModuleSemaphore.WaitAsync();
|
||||||
|
|
||||||
if (ActiveModuleOverride == overrideModule)
|
if (ActiveModuleOverride == overrideModule)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!await ActiveModuleSemaphore.WaitAsync(TimeSpan.FromSeconds(10)))
|
|
||||||
throw new ArtemisCoreException("Timed out while acquiring active module lock");
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ActiveModuleOverride = overrideModule;
|
ActiveModuleOverride = overrideModule;
|
||||||
@ -92,8 +91,7 @@ namespace Artemis.Core.Services
|
|||||||
if (ActiveModuleOverride != null)
|
if (ActiveModuleOverride != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!await ActiveModuleSemaphore.WaitAsync(TimeSpan.FromSeconds(10)))
|
await ActiveModuleSemaphore.WaitAsync();
|
||||||
throw new ArtemisCoreException("Timed out while acquiring active module lock");
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,10 +27,8 @@ namespace Artemis.UI.Screens.Module.Tabs
|
|||||||
|
|
||||||
protected override void OnActivate()
|
protected override void OnActivate()
|
||||||
{
|
{
|
||||||
if (!Items.Any())
|
Items.Clear();
|
||||||
Items.AddRange(Module.ActivationRequirements.Select(_moduleVmFactory.CreateActivationRequirementViewModel));
|
Items.AddRange(Module.ActivationRequirements.Select(_moduleVmFactory.CreateActivationRequirementViewModel));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user