Skip to content

Commit

Permalink
AutoHide: Automatically set expirationTime
Browse files Browse the repository at this point in the history
This readds code that I removed with the progress refactor, as it turns
out too many people relied on WA fixing their state.

WA shouldn't modify the state (except for the changed, show=false interactions),
but to remove this code we need to deprecate/warn about it.

Fixes: #4942
  • Loading branch information
InfusOnWoW committed Mar 22, 2024
1 parent e92843c commit 1bf6c9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WeakAuras/WeakAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4513,6 +4513,10 @@ local function startStopTimers(id, cloneId, triggernum, state)
stopAutoHideTimer(id, triggernum, cloneId)
return
else
if state.expirationTime == nil and type(state.duration) == "number" then
-- Set the expiration time, because users rely on that, even though it's wrong to do
state.expirationTime = GetTime() + state.duration
end
expirationTime = state.expirationTime
end
elseif type(state.autoHide) == "number" then
Expand Down

0 comments on commit 1bf6c9f

Please sign in to comment.