mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Fix(Contacts): Fixed real-time showing new contacts
This commit is contained in:
1 parent
e1b3a84323
commit
68c0ce4037
2 files changed
+28
-25
No files matched your search
@@ -10,11 +10,16 @@ onNet(events.CONTACTS_SEND_CONTACTS, (contacts: any) => {
|
||||
data: contacts
|
||||
})
|
||||
)
|
||||
})
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(events.CONTACTS_ADD_CONTACT_NUI);
|
||||
on(`__cfx_nui:${events.CONTACTS_ADD_CONTACT_NUI}`, (data: any) => {
|
||||
RegisterNuiCallbackType(events.CONTACTS_ADD_CONTACT);
|
||||
on(`__cfx_nui:${events.CONTACTS_ADD_CONTACT}`, (data: any) => {
|
||||
const display = data.name;
|
||||
const number = data.number;
|
||||
emitNet(events.CONTACTS_ADD_CONTACT, display, number);
|
||||
const avatar = data.avatar;
|
||||
emitNet(events.CONTACTS_ADD_CONTACT, number, display, avatar);
|
||||
|
||||
setTimeout(() => {
|
||||
emitNet(events.CONTACTS_GET_CONTACTS)
|
||||
}, 1000)
|
||||
});
|
||||
Reference in new issue
Block a user