Skip to content

Commit

Permalink
Changes according to SQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander van Delft committed Dec 9, 2024
1 parent ef59fa4 commit 3eb60ec
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion COMET.Web.Common/Services/Cache/CacheService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class CacheService : ICacheService
/// <summary>
/// Holds all the settings that can be used during the browser session's lifetime to make the user's experience better
/// </summary>
private ConcurrentDictionary<BrowserSessionSettingKey, object> browserSessionSettings = new();
private readonly ConcurrentDictionary<BrowserSessionSettingKey, object> browserSessionSettings = new();

/// <summary>
/// Tries to get a stored value in the BrowserSessionSettings Dictionary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public virtual async Task<Result<Iteration>> OpenSession()
/// <param name="domainId">The <see cref="Guid" /> of the <see cref="DomainOfExpertise" /> to select</param>
public void PreSelectIteration(Guid modelId, Guid iterationId, Guid domainId)
{
if (!this.cacheService.TryGetBrowserSessionSetting(BrowserSessionSettingKey.LastUsedIterationData, out var lastSelectedIterationData))
if (!this.cacheService.TryGetBrowserSessionSetting(BrowserSessionSettingKey.LastUsedIterationData, out _))
{
this.selectedEngineeringModel = this.sessionService.OpenEngineeringModels.FirstOrDefault(x => x.Iid == modelId)?.EngineeringModelSetup;
var iterationSetup = this.SelectedEngineeringModel?.IterationSetup.Find(x => x.IterationIid == iterationId);
Expand Down
6 changes: 0 additions & 6 deletions COMETwebapp/ViewModels/Pages/TabsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ public class TabsViewModel : DisposableObject, ITabsViewModel
/// </summary>
private readonly IServiceProvider serviceProvider;

/// <summary>
/// Gets the injected <see cref="ICacheService" />
/// </summary>
private readonly ICacheService cacheService;

/// <summary>
/// Gets the injected <see cref="ISessionService" />
/// </summary>
Expand All @@ -72,7 +67,6 @@ public TabsViewModel(ISessionService sessionService, IServiceProvider servicePro
{
this.sessionService = sessionService;
this.serviceProvider = serviceProvider;
this.cacheService = cacheService;
this.Disposables.Add(this.WhenAnyValue(x => x.SelectedApplication).Subscribe(_ => this.OnSelectedApplicationChange()));
this.Disposables.Add(this.WhenAnyValue(x => x.MainPanel.CurrentTab).Subscribe(_ => this.OnCurrentTabChange(this.MainPanel)));
this.Disposables.Add(this.WhenAnyValue(x => x.SidePanel.CurrentTab).Subscribe(_ => this.OnCurrentTabChange(this.SidePanel)));
Expand Down

0 comments on commit 3eb60ec

Please sign in to comment.