@@ -144,10 +144,16 @@ export const ChatViewList: React.FC<IChatViewListProps> = (options: IChatViewLis
144
144
145
145
// Change listtype to 'CHATS' and hidden to false when chatAcceptStream is received
146
146
useEffect ( ( ) => {
147
- if ( Object . keys ( chatAcceptStream || { } ) . length > 0 && chatAcceptStream . constructor === Object ) {
147
+ if (
148
+ ( Object . keys ( chatAcceptStream || { } ) . length > 0 && chatAcceptStream . constructor === Object ) ||
149
+ ( Object . keys ( participantJoinStream || { } ) . length > 0 && participantJoinStream . constructor === Object )
150
+ ) {
148
151
// Always change hidden to false and list will be CHATS
149
152
const updatedChatInfo = { ...( initialized . chatInfo as IChatInfoResponse ) } ;
150
- if ( updatedChatInfo ) updatedChatInfo . list = 'CHATS' ;
153
+ if ( updatedChatInfo ) {
154
+ updatedChatInfo . list = 'CHATS' ;
155
+ if ( updatedChatInfo ?. meta ) updatedChatInfo . meta . visibility = true ;
156
+ }
151
157
152
158
// set initialized after chat accept animation is done
153
159
const timer = setTimeout ( ( ) => {
@@ -160,10 +166,16 @@ export const ChatViewList: React.FC<IChatViewListProps> = (options: IChatViewLis
160
166
161
167
// Change listtype to 'UINITIALIZED' and hidden to true when participantRemoveStream or participantLeaveStream is received
162
168
useEffect ( ( ) => {
163
- if ( Object . keys ( participantRemoveStream || { } ) . length > 0 && participantRemoveStream . constructor === Object ) {
169
+ if (
170
+ ( Object . keys ( participantRemoveStream || { } ) . length > 0 && participantRemoveStream . constructor === Object ) ||
171
+ ( Object . keys ( participantLeaveStream || { } ) . length > 0 && participantLeaveStream . constructor === Object )
172
+ ) {
164
173
// If not encrypted, then set hidden to false
165
174
const updatedChatInfo = { ...( initialized . chatInfo as IChatInfoResponse ) } ;
166
- if ( updatedChatInfo ) updatedChatInfo . list = 'UNINITIALIZED' ;
175
+ if ( updatedChatInfo ) {
176
+ updatedChatInfo . list = 'UNINITIALIZED' ;
177
+ if ( updatedChatInfo ?. meta ) updatedChatInfo . meta . visibility = false ;
178
+ }
167
179
168
180
setInitialized ( { ...initialized , chatInfo : updatedChatInfo , isHidden : true } ) ;
169
181
}
@@ -357,7 +369,7 @@ export const ChatViewList: React.FC<IChatViewListProps> = (options: IChatViewLis
357
369
flexDirection = "column"
358
370
justifyContent = "start"
359
371
width = "100%"
360
- blur = { initialized . isHidden }
372
+ blur = { initialized . isHidden && initialized ?. chatInfo ?. list !== 'REQUESTS' }
361
373
>
362
374
{ messages &&
363
375
messages ?. map ( ( chat : IMessageIPFS , index : number ) => {
0 commit comments