From 878763867a758b4fdc717b1aaee28a11e65824ce Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Fri, 5 May 2023 14:51:52 +1000 Subject: [PATCH] refactor(client/progress): don't clear progress on cancel Sending "progressCancel" to NUI will cause a transition and then trigger "progressComplete" with a slight delay (~100ms). Should look better when people queue up progress bars. --- resource/interface/client/progress.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resource/interface/client/progress.lua b/resource/interface/client/progress.lua index 290d990..a8a7c3b 100644 --- a/resource/interface/client/progress.lua +++ b/resource/interface/client/progress.lua @@ -147,10 +147,8 @@ local function startProgress(data) end playerState.invBusy = false - local cancel = progress == false - progress = nil - if cancel then + if progress == false then SendNUIMessage({ action = 'progressCancel' }) return false end