File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -555,10 +555,8 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
555555
556556 final isNew = ! _remoteParticipants.containsKey (info.identity);
557557
558- if (info.state == lk_models.ParticipantInfo_State .DISCONNECTED &&
559- ! isNew) {
560- hasChanged = true ;
561- await _handleParticipantDisconnect (info.identity);
558+ if (info.state == lk_models.ParticipantInfo_State .DISCONNECTED ) {
559+ hasChanged = await _handleParticipantDisconnect (info.identity);
562560 continue ;
563561 }
564562
@@ -697,15 +695,16 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
697695 events.emit (event);
698696 }
699697
700- Future <void > _handleParticipantDisconnect (String identity) async {
698+ Future <bool > _handleParticipantDisconnect (String identity) async {
701699 final participant = _remoteParticipants.remove (identity);
702700 if (participant == null ) {
703- return ;
701+ return false ;
704702 }
705703
706704 await participant.removeAllPublishedTracks (notify: true );
707705
708706 emitWhenConnected (ParticipantDisconnectedEvent (participant: participant));
707+ return true ;
709708 }
710709
711710 Future <void > _sendSyncState () async {
You can’t perform that action at this time.
0 commit comments