Clearing Entity Click View on Clear and other notes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
@inject IKeyService KeyService
|
||||
@inject IImmortalSelectionService FilterService
|
||||
@inject IStorageService StorageService
|
||||
@inject IBuildOrderService BuildOrderService
|
||||
@using Services.Website
|
||||
@implements IDisposable
|
||||
|
||||
@@ -33,6 +34,7 @@
|
||||
base.OnInitialized();
|
||||
KeyService.Subscribe(HandleClick);
|
||||
StorageService.Subscribe(RefreshDefaults);
|
||||
BuildOrderService.Subscribe(OnBuildOrderServiceChanged);
|
||||
|
||||
RefreshDefaults();
|
||||
}
|
||||
@@ -40,11 +42,20 @@
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
KeyService.Unsubscribe(HandleClick);
|
||||
|
||||
StorageService.Unsubscribe(RefreshDefaults);
|
||||
BuildOrderService.Unsubscribe(OnBuildOrderServiceChanged);
|
||||
}
|
||||
|
||||
|
||||
void OnBuildOrderServiceChanged()
|
||||
{
|
||||
if (BuildOrderService.GetLastRequestInterval() == 0)
|
||||
{
|
||||
_entity = null;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void RefreshDefaults()
|
||||
{
|
||||
_viewType = StorageService.GetValue<bool>(StorageKeys.IsPlainView) ? EntityViewType.Plain : EntityViewType.Detailed;
|
||||
|
||||
Reference in New Issue
Block a user