Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

fix(chat): Make sure user doesn't land on hidden or null chat mode, after using "chat:removeMode" #200

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

CritteRo
Copy link

PR started from issue: https://forum.cfx.re/t/chat-chat-removemode-event-will-not-remove-the-all-mode-immediately/4790531/2

Changes made:

  • moved globalMode (_global) as the first mode, and defaultMode as second mode and changed default modeIdx value to reflect that. This should fix the situations where users on default mode will have their "all" chat removed, but then could see "_global" chat.

  • Added a check on ON_MODE_REMOVE(), to make sure that modeIdx doesn't point to an undefined mode after removing the chat mode. (But it could still point to hidden modes!! )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant