agora-appbuilder-core 4.0.0-api.0 → 4.0.0-api.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.0-api.0",
3
+ "version": "4.0.0-api.1",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -187,9 +187,9 @@ const Create = ({
187
187
  mode == ChannelProfile.LiveBroadcasting &&
188
188
  rtcProps?.role == ClientRole.Audience
189
189
  ) {
190
- await enableVideoAndAudioWithDisabledState();
190
+ enableVideoAndAudioWithDisabledState();
191
191
  } else {
192
- await enableVideoAndAudioWithEnabledState();
192
+ enableVideoAndAudioWithEnabledState();
193
193
  }
194
194
  };
195
195
 
@@ -346,7 +346,7 @@ const Navbar = () => {
346
346
  <ToolbarItem>
347
347
  <ParticipantsCount />
348
348
  </ToolbarItem>
349
- {!isRecordingActive ? (
349
+ {isRecordingActive ? (
350
350
  <ToolbarItem>
351
351
  <RecordingInfo
352
352
  recordingLabel={isHorizontal ? recordingLabel : ''}
@@ -91,8 +91,8 @@ const RtmConfigure = (props: any) => {
91
91
 
92
92
  React.useEffect(() => {
93
93
  const handBrowserClose = (ev) => {
94
- // ev.preventDefault();
95
- // return (ev.returnValue = 'Are you sure you want to exit?');
94
+ ev.preventDefault();
95
+ return (ev.returnValue = 'Are you sure you want to exit?');
96
96
  };
97
97
  const logoutRtm = () => {
98
98
  engine.current.leaveChannel(rtcProps.channel);
@@ -71,7 +71,7 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
71
71
  const {dispatch} = useContext(DispatchContext);
72
72
  const {defaultContent} = useContent();
73
73
  const localUid = useLocalUid();
74
- const {setSidePanel} = useSidePanel();
74
+ const {setSidePanel, sidePanel} = useSidePanel();
75
75
  const {chatType, setChatType, privateChatUser, setPrivateChatUser} =
76
76
  useChatUIControls();
77
77
  const {
@@ -87,7 +87,7 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
87
87
  }>({});
88
88
 
89
89
  const defaultContentRef = useRef({defaultContent: defaultContent});
90
- const groupActiveRef = useRef<boolean>();
90
+ const groupActiveRef = useRef<boolean>(false);
91
91
  const individualActiveRef = useRef<string | number>();
92
92
 
93
93
  //commented for v1 release
@@ -99,8 +99,9 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
99
99
  }, [defaultContent]);
100
100
 
101
101
  useEffect(() => {
102
- groupActiveRef.current = chatType === ChatType.Group;
103
- }, [chatType]);
102
+ groupActiveRef.current =
103
+ chatType === ChatType.Group && sidePanel === SidePanelType.Chat;
104
+ }, [chatType, sidePanel]);
104
105
 
105
106
  useEffect(() => {
106
107
  individualActiveRef.current = privateChatUser;