-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from cometchat-pro/V3.0.0-beta1-2
optimistic ui
- Loading branch information
Showing
113 changed files
with
2,377 additions
and
674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/components/Calls/CometChatIncomingDirectCall/controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { CometChat } from '@cometchat-pro/react-native-chat'; | ||
|
||
import * as enums from '../../../utils/enums'; | ||
|
||
export class messageAlertManager { | ||
msgListenerId = 'incoming_message_' + new Date().getTime(); | ||
|
||
attachListeners(callback) { | ||
CometChat.addMessageListener( | ||
this.msgListenerId, | ||
new CometChat.MessageListener({ | ||
onCustomMessageReceived: (customMessage) => { | ||
if (customMessage.type == enums.CUSTOM_TYPE_MEETING) { | ||
callback(enums.CUSTOM_MESSAGE_RECEIVED, customMessage); | ||
} | ||
}, | ||
}), | ||
); | ||
} | ||
|
||
removeListeners() { | ||
CometChat.removeMessageListener(this.msgListenerId); | ||
} | ||
} |
Oops, something went wrong.