Skip to content

Commit

Permalink
🐛 Fixed a bug with people that had items from older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
AssisrMatheus committed Sep 25, 2019
1 parent 804469e commit a0b0bca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TodoChecklister.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Title: TodoChecklister
## Author: Matheus Assis Rios (github.com/AssisrMatheus)
## Notes: I have bad memory so I made this. A todolist/checklist AddOn for World of Warcraft.
## Version: 1.2.2
## Version: 1.2.3
## DefaultState: enabled
## OptionalDeps: LibStub, LibDataBroker
## SavedVariables: TodoChecklisterDB, TodoChecklisterMapIcon, TodoChecklisterSettingsDB
Expand Down
12 changes: 10 additions & 2 deletions src/components/TodoChecklister.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,14 @@ function TodoChecklisterFrame:PaintItem(frame, todoItem, index)
frame.TodoContent:SetWidth(TodoItemsScrollFrame:GetWidth() - frame.RemoveButton:GetWidth() - 23)

if (self.displayLinked) then
local identifier

if (todoItem.id) then
identifier = todoItem.id
else
identifier = todoItem.text
end

FunctionUtils:Memoize(
function()
-- Startup regex process by storing string values
Expand Down Expand Up @@ -267,8 +275,8 @@ function TodoChecklisterFrame:PaintItem(frame, todoItem, index)
frame.TodoContent.FontText:SetText(todoItem.text)
end
end,
todoItem.id .. self.memoizationId,
todoItem.id .. "Count"
identifier .. self.memoizationId,
identifier .. "Count"
)
else
frame.TodoContent.FontText:SetText(todoItem.text)
Expand Down

0 comments on commit a0b0bca

Please sign in to comment.