diff --git a/apps/game/client/cl_main.ts b/apps/game/client/cl_main.ts index 5d9c1fde6..6d9bdf218 100644 --- a/apps/game/client/cl_main.ts +++ b/apps/game/client/cl_main.ts @@ -173,6 +173,11 @@ RegisterNuiCB<{ keepGameFocus: boolean }>( }, ); +// If you want to remove controls from a external application this is the way to do it. +on(PhoneEvents.SET_GAME_FOCUS, (keepGameFocus: boolean) => { + if (global.isPhoneOpen) SetNuiFocusKeepInput(keepGameFocus); +}); + /* * * * * * * * * * * * * * * PhoneAsItem Export Checker diff --git a/apps/phone/src/apps/contacts/components/List/ContactList.tsx b/apps/phone/src/apps/contacts/components/List/ContactList.tsx index b4d55a378..a3d596bc4 100644 --- a/apps/phone/src/apps/contacts/components/List/ContactList.tsx +++ b/apps/phone/src/apps/contacts/components/List/ContactList.tsx @@ -11,6 +11,7 @@ import { useContactActions } from '@apps/contacts/hooks/useContactActions'; import { useMyPhoneNumber } from '@os/simcard/hooks/useMyPhoneNumber'; import { Phone, MessageSquare, Plus } from 'lucide-react'; import { List, ListItem, NPWDButton } from '@npwd/keyos'; +import { initials } from '@utils/misc'; export const ContactList: React.FC = () => { const filteredContacts = useFilteredContacts(); @@ -47,7 +48,7 @@ export const ContactList: React.FC = () => { .sort() .map((letter) => (
{contact.display} diff --git a/apps/phone/src/apps/contacts/components/views/ContactInfo.tsx b/apps/phone/src/apps/contacts/components/views/ContactInfo.tsx index 15faa19cb..88dfc09e6 100644 --- a/apps/phone/src/apps/contacts/components/views/ContactInfo.tsx +++ b/apps/phone/src/apps/contacts/components/views/ContactInfo.tsx @@ -17,6 +17,7 @@ import LogDebugEvent from '@os/debug/LogDebugEvents'; import { useModal } from '@apps/contacts/hooks/useModal'; import { usePhone } from '@os/phone/hooks/usePhone'; import { cn } from '@utils/css'; +import { initials } from '@utils/misc'; interface ContactInfoRouteParams { mode: string; @@ -161,7 +162,7 @@ const ContactsInfoPage: React.FC = () => { if (addNumber) setNumber(addNumber); if (avatarParam) setAvatar(avatarParam); if (nameParam) setName(nameParam); - }, [addNumber, avatar, avatarParam, nameParam]); + }, [addNumber, avatarParam, nameParam]); if (!ResourceConfig) return null; @@ -174,17 +175,25 @@ const ContactsInfoPage: React.FC = () => { />