mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
handle all configuration cases
This commit is contained in:
1 parent
8000cc3d3f
commit
97f5c99cc0
12 files changed
+289
-157
No files matched your search
@@ -17,6 +17,7 @@ function fetchOnInitialize() {
|
||||
emitNet(events.MESSAGES_FETCH_MESSAGE_GROUPS);
|
||||
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE);
|
||||
sendMessage('PHONE', 'setPhoneReady', isPhoneReady);
|
||||
sendMessage('PHONE', 'phoneConfig', config);
|
||||
}
|
||||
|
||||
RegisterKeyMapping('phone', 'Open Phone', 'keyboard', 'f1');
|
||||
|
||||
@@ -18,6 +18,24 @@ onNet(events.TWITTER_GET_OR_CREATE_PROFILE_FAILURE, () => {
|
||||
sendTwitterMessage(events.TWITTER_GET_OR_CREATE_PROFILE_FAILURE);
|
||||
});
|
||||
|
||||
onNet(events.TWITTER_GET_OR_CREATE_PROFILE_NULL, (defaultProfileNames: string[]): void => {
|
||||
sendTwitterMessage(events.TWITTER_GET_OR_CREATE_PROFILE_NULL, defaultProfileNames);
|
||||
});
|
||||
|
||||
/**
|
||||
* Twitter create profile
|
||||
*/
|
||||
RegisterNuiCallbackType(events.TWITTER_CREATE_PROFILE);
|
||||
on(`__cfx_nui:${events.TWITTER_CREATE_PROFILE}`, (data: any) => {
|
||||
sendTwitterMessage(events.TWITTER_UPDATE_PROFILE_LOADING, true);
|
||||
emitNet(events.TWITTER_CREATE_PROFILE, data);
|
||||
});
|
||||
|
||||
onNet(events.TWITTER_CREATE_PROFILE_RESULT, (alert: IAlertProps) => {
|
||||
sendTwitterMessage(events.TWITTER_CREATE_PROFILE_RESULT, alert);
|
||||
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE);
|
||||
});
|
||||
|
||||
/**
|
||||
* Twitter update profile
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user