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)
|
||||
{
|
||||
await ActiveModuleSemaphore.WaitAsync();
|
||||
|
||||
if (ActiveModuleOverride == overrideModule)
|
||||
return;
|
||||
|
||||
if (!await ActiveModuleSemaphore.WaitAsync(TimeSpan.FromSeconds(10)))
|
||||
throw new ArtemisCoreException("Timed out while acquiring active module lock");
|
||||
|
||||
try
|
||||
{
|
||||
ActiveModuleOverride = overrideModule;
|
||||
@ -92,8 +91,7 @@ namespace Artemis.Core.Services
|
||||
if (ActiveModuleOverride != null)
|
||||
return;
|
||||
|
||||
if (!await ActiveModuleSemaphore.WaitAsync(TimeSpan.FromSeconds(10)))
|
||||
throw new ArtemisCoreException("Timed out while acquiring active module lock");
|
||||
await ActiveModuleSemaphore.WaitAsync();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@ -24,13 +24,11 @@ namespace Artemis.UI.Screens.Module.Tabs
|
||||
public Core.Plugins.Modules.Module Module { get; }
|
||||
|
||||
public string ActivationType { get; set; }
|
||||
|
||||
|
||||
protected override void OnActivate()
|
||||
{
|
||||
if (!Items.Any())
|
||||
Items.AddRange(Module.ActivationRequirements.Select(_moduleVmFactory.CreateActivationRequirementViewModel));
|
||||
|
||||
|
||||
Items.Clear();
|
||||
Items.AddRange(Module.ActivationRequirements.Select(_moduleVmFactory.CreateActivationRequirementViewModel));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user