Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup #6820

Merged
merged 4 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Classes/CheckBoxControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function CheckBoxClass:Draw(viewPort, noTooltip)
elseif mOver then
SetDrawColor(1, 1, 1)
elseif self.borderFunc then
r, g, b = self.borderFunc()
local r, g, b = self.borderFunc()
SetDrawColor(r, g, b)
else
SetDrawColor(0.5, 0.5, 0.5)
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/DropDownControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function DropDownClass:Draw(viewPort, noTooltip)
elseif mOver or self.dropped then
SetDrawColor(1, 1, 1)
elseif self.borderFunc then
r, g, b = self.borderFunc()
local r, g, b = self.borderFunc()
SetDrawColor(r, g, b)
else
SetDrawColor(0.5, 0.5, 0.5)
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/EditControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function EditClass:Draw(viewPort, noTooltip)
elseif mOver then
SetDrawColor(1, 1, 1)
elseif self.borderFunc then
r, g, b = self.borderFunc()
local r, g, b = self.borderFunc()
SetDrawColor(r, g, b)
else
SetDrawColor(0.5, 0.5, 0.5)
Expand Down
11 changes: 2 additions & 9 deletions src/Classes/SkillListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,7 @@ end

function SkillListClass:GetRowIcon(column, index, socketGroup)
if column == 1 then
local slot = socketGroup.slot or nil
local color = "^7"
local currentMainSkill = self.skillsTab.build.mainSocketGroup == index
local disabled = not socketGroup.enabled or not socketGroup.slotEnabled
local slot = socketGroup.slot
local itemsTab = self.skillsTab.build.itemsTab
local weapon1Sel = itemsTab.activeItemSet["Weapon 1"].selItemId or 0
local weapon1Type = itemsTab.items[weapon1Sel] and itemsTab.items[weapon1Sel].base.type or "None"
Expand All @@ -232,10 +229,6 @@ function SkillListClass:GetRowIcon(column, index, socketGroup)
if slot == "Weapon 2 Swap" and (weapon2SwapType == "Quiver" or weapon2SwapType == "Shield") then
slot = weapon2SwapType.." Swap"
end
if slot_map[slot] then
return slot_map[slot].icon
else
return nil
end
return slot_map[slot] and slot_map[slot].icon
end
end
5 changes: 1 addition & 4 deletions src/Classes/TradeQuery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,9 @@ function TradeQueryClass:PullLeagueList()
self:SetNotice(self.controls.pbNotice, "Failed to Get PoE League List response")
return
end
table.sort(json_data, function(a, b)
table.sort(json_data, function(a, b)
if a.endAt == nil then return false end
if b.endAt == nil then return true end
if a.endAt == b.endAt then
return #a.id < #b.id
end
return #a.id < #b.id
end)
self.itemsTab.leagueDropList = {}
Expand Down
Loading