diff --git a/Modules/History/lootHistory.lua b/Modules/History/lootHistory.lua index 002ceeab..1eab77e0 100644 --- a/Modules/History/lootHistory.lua +++ b/Modules/History/lootHistory.lua @@ -1082,7 +1082,7 @@ function LootHistory:UpdateMoreInfo(rowFrame, cellFrame, dat, cols, row, realrow end tip:AddLine(" ") tip:AddLine(L["Total awards"]) - table.sort(moreInfoData[row.name].totals.responses, function(a,b) return type(a[4]) == "number" and type(b[4]) == "number" and a[4] < b[4] or false end) + table.sort(moreInfoData[row.name].totals.responses, function(a,b) return type(a[2]) == "number" and type(b[2]) == "number" and a[2] > b[2] or false end) for _, v in pairs(moreInfoData[row.name].totals.responses) do local r,g,b if v[3] then r,g,b = unpack(v[3],1,3) end @@ -1402,6 +1402,7 @@ function LootHistory.RightClickMenu(menu, level) entry.tokenRoll = nil entry.relicRoll = nil data.response = i + entry.typeCode = "default" data.cols[6].args = {color = entry.color, response = entry.response, responseID = i} LootHistory.frame.st:SortData() addon:SendMessage("RCHistory_ResponseEdit", data) @@ -1430,9 +1431,8 @@ function LootHistory.RightClickMenu(menu, level) entry.response = addon:GetResponse(k,i).text entry.color = {addon:GetResponseColor(k, i)} entry.isAwardReason = nil - entry.tokenRoll = nil - entry.relicRoll = nil data.response = i + entry.typeCode = k data.cols[6].args = {color = entry.color, response = entry.response, responseID = i} LootHistory.frame.st:SortData() addon:SendMessage("RCHistory_ResponseEdit", data) @@ -1455,6 +1455,7 @@ function LootHistory.RightClickMenu(menu, level) entry.response = addon:GetResponse("default",k).text entry.color = {addon:GetResponseColor("default", k)} entry.isAwardReason = nil + entry.typeCode = "default" data.response = k data.cols[6].args = {color = entry.color, response = entry.response, responseID = k} LootHistory.frame.st:SortData() diff --git a/Modules/votingFrame.lua b/Modules/votingFrame.lua index 90c033f5..467a5ad1 100644 --- a/Modules/votingFrame.lua +++ b/Modules/votingFrame.lua @@ -1078,6 +1078,8 @@ function RCVotingFrame:UpdateMoreInfo(row, data) end tip:AddLine(" ") -- spacer tip:AddLine(_G.TOTAL) + table.sort(moreInfoData[name].totals.responses, + function(a, b) return type(a[2]) == "number" and type(b[2]) == "number" and a[2] > b[2] or false end) for _, v in pairs(moreInfoData[name].totals.responses) do if v[3] then r,g,b = unpack(v[3],1,3) end tip:AddDoubleLine(v[1], v[2], r or 1,g or 1,b or 1, r or 1,g or 1,b or 1) diff --git a/changelog.md b/changelog.md index 5c2c2195..922e7fdc 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,7 @@ Now properly tracks responses from item groups other than default and tier token. +Responses are now sorted by number of awards. ## Bugfixes