MultibotInit.lua Refactor#126
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abea6bfbfb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| local function layoutVisibleUnits(unitsButton, unitsFrame, display, fromIndex, toIndex) | ||
| local visibleCount = 0 | ||
|
|
||
| for index = fromIndex or 1, toIndex or 0 do |
There was a problem hiding this comment.
Hide previous units page before drawing next page
The pagination helper hides the same fromIndex..toIndex range it is about to show, so when Browse advances from page 1 to page 2 the old page (unitsButton.from..unitsButton.to) is never hidden. This leaves stale unit rows visible/overlapping and can cause users to interact with the wrong bot entry after paging. The old inline implementation hid the previously visible range first, so this is a regression in the extracted helper.
Useful? React with 👍 / 👎.
| local statsFrame = MultiBot.newFrame(MultiBot, STATS_ROOT_X, STATS_ROOT_Y, STATS_ROOT_SIZE) | ||
| statsFrame:SetMovable(true) | ||
| statsFrame:Hide() |
There was a problem hiding this comment.
Reapply saved StatsPoint when creating stats UI lazily
The stats frame is now created on demand, but this initializer always places it at hardcoded defaults and never reapplies the persisted StatsPoint. Since layout restoration runs during ADDON_LOADED (before lazy creation), users who moved the stats window will lose that position on every reload/login until manually repositioned again.
Useful? React with 👍 / 👎.
No description provided.