Fix 'Add Item' not being visible when it should be

master v5.5
Liza 2024-08-31 21:11:45 +02:00
parent 4b598ed485
commit c04b9e2ac5
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<Project Sdk="Dalamud.NET.Sdk/9.0.2">
<PropertyGroup>
<Version>5.4</Version>
<Version>5.5</Version>
<OutputPath>dist</OutputPath>
</PropertyGroup>

View File

@ -416,7 +416,7 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig
itemsWrapper.Save();
}
if (_configuration.ItemsToPurchase.Any(x =>
if (_configuration.ItemsAvailableToPurchase.Any(x =>
itemsWrapper.GetItemsToPurchase().All(y => x.ItemId != y.ItemId)))
{
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Plus, "Add Item"))
@ -430,7 +430,8 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig
{
if (ImGui.MenuItem($"{reward.Name}##{purchaseOption.ItemId}"))
{
itemsWrapper.Add(new Configuration.PurchasePriority { ItemId = purchaseOption.ItemId, Limit = 0 });
itemsWrapper.Add(new Configuration.PurchasePriority
{ ItemId = purchaseOption.ItemId, Limit = 0 });
itemsWrapper.Save();
ImGui.CloseCurrentPopup();
}
@ -441,9 +442,10 @@ internal sealed class TurnInWindow : LWindow, IPersistableWindowConfig
}
ImGui.SameLine();
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Cog, "Configure available Items"))
_configWindow.IsOpen = true;
}
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Cog, "Configure available Items"))
_configWindow.IsOpen = true;
}
private void DrawItemToBuy(GrandCompany grandCompany, int i, IItemsToPurchase itemsWrapper,