Warnings fixed

This commit is contained in:
cake
2025-11-15 05:11:19 +01:00
parent b56813c1de
commit a869b369aa
5 changed files with 18 additions and 16 deletions

View File

@@ -406,7 +406,7 @@ internal sealed partial class CharaDataHubUi
{
_uiSharedService.BigText("Poses");
var poseCount = updateDto.PoseList.Count();
using (ImRaii.Disabled(poseCount >= maxPoses))
using (ImRaii.Disabled(poseCount >= _maxPoses))
{
if (_uiSharedService.IconTextButton(FontAwesomeIcon.Plus, "Add new Pose"))
{
@@ -414,8 +414,8 @@ internal sealed partial class CharaDataHubUi
}
}
ImGui.SameLine();
using (ImRaii.PushColor(ImGuiCol.Text, UIColors.Get("LightlessYellow"), poseCount == maxPoses))
ImGui.TextUnformatted($"{poseCount}/{maxPoses} poses attached");
using (ImRaii.PushColor(ImGuiCol.Text, UIColors.Get("LightlessYellow"), poseCount == _maxPoses))
ImGui.TextUnformatted($"{poseCount}/{_maxPoses} poses attached");
ImGuiHelpers.ScaledDummy(5);
using var indent = ImRaii.PushIndent(10f);

View File

@@ -20,7 +20,7 @@ namespace LightlessSync.UI;
internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
{
private const int maxPoses = 10;
private const int _maxPoses = 10;
private readonly CharaDataManager _charaDataManager;
private readonly CharaDataNearbyManager _charaDataNearbyManager;
private readonly CharaDataConfigService _configService;
@@ -32,7 +32,7 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
private readonly UiSharedService _uiSharedService;
private CancellationTokenSource _closalCts = new();
private bool _disableUI = false;
private CancellationTokenSource _disposalCts = new();
private readonly CancellationTokenSource _disposalCts = new();
private string _exportDescription = string.Empty;
private string _filterCodeNote = string.Empty;
private string _filterDescription = string.Empty;
@@ -144,6 +144,8 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
{
_closalCts.CancelDispose();
_disposalCts.CancelDispose();
_disposalCts.Dispose();
_closalCts.Dispose();
}
base.Dispose(disposing);