qbcore-framework / qb-radio

Radio Script With UI
GNU General Public License v3.0
23 stars 126 forks source link

Avoid double execution of slideDown on closure #40

Closed RSpeekenbrink closed 10 months ago

RSpeekenbrink commented 1 year ago

Describe Pull request When closing the radio via the escape key an event is being triggered on the "backend" (client.lua) script which then closes the radio. This close function already sends an event back to the frontend to execute the frontend slide down function. So it is not required to execute it again.

(See https://github.com/qbcore-framework/qb-radio/blob/main/client.lua#L85 and https://github.com/qbcore-framework/qb-radio/blob/main/html/js/script.js#L8)

Questions (please complete the following information):

GhzGarage commented 10 months ago

https://github.com/qbcore-framework/qb-radio/pull/41