Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks & fixes #52

Merged
merged 7 commits into from
Feb 20, 2022
Merged

Tweaks & fixes #52

merged 7 commits into from
Feb 20, 2022

Conversation

dunak-debug
Copy link
Contributor

@dunak-debug dunak-debug commented Jan 31, 2022

Fixes nil user settings error caused by early usage of settings when not acquired from NUI.

I want to merge this to main so it makes pe-ui at least usable before any pending breaking commits.

Dependencies were upgraded too

.gitignore Show resolved Hide resolved
client/prompt.lua Show resolved Hide resolved
Copy link
Contributor

@TasoOneAsia TasoOneAsia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TasoOneAsia
Copy link
Contributor

Rebase against new sec fixes and this can be merged.

@LukeWasTakenn
Copy link
Contributor

Rebase against new sec fixes and this can be merged.

Should be good now I think

Copy link
Contributor

@TasoOneAsia TasoOneAsia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LukeWasTakenn, if this was tested in-game. All good to be merged.

Just one small thing that should eliminate an unnecessary call.

promptIsOpen = false
cb({})
cb({ body = json.encode({}) })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I missed this the first time I reviewed

Suggested change
cb({ body = json.encode({}) })
cb({ body = '{}' })

Should eliminate unnecessary encode call.

Copy link
Contributor

@LukeWasTakenn LukeWasTakenn Feb 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why Dunak chose to use RegisterRawNuiCallback in the first place actually, The other week we found that unregistering the raw nui callback would for some reason a trigger completely unrelated event 🤷

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RegisterRawNuiCallback is being used in conjunction with UnregisterRawNuiCallback to eliminate possible memory leaky behavior in the underlying ResourceUI container.

You can see the following for more information.
citizenfx/fivem#1045

client/prompt.lua Outdated Show resolved Hide resolved
* Use the correct nui callback name when unregistering
@LukeWasTakenn LukeWasTakenn merged commit b4aae3f into master Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants