Skip to content

Commit c10bda6

Browse files
committed
fix loading spinner for participants without peerConnection
This happens e.g. when they don't have permissions to send audio and video. The fix is to set isConnected = true in the ParticipantUiState creation. At first it felt like setting isConnected to true is a hack, but it should be okay as it's immediately changed by the peerConnection handling for the other cases. Signed-off-by: Marcel Hibbe <[email protected]>
1 parent e54bb59 commit c10bda6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/main/java/com/nextcloud/talk/activities/ParticipantHandler.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ParticipantHandler(
3434
baseUrl = baseUrl,
3535
roomToken = roomToken,
3636
nick = "Guest",
37-
isConnected = false,
37+
isConnected = true,
3838
isAudioEnabled = false,
3939
isStreamEnabled = false,
4040
isScreenStreamEnabled = false,
@@ -162,9 +162,12 @@ class ParticipantHandler(
162162
this.peerConnection = peerConnection
163163

164164
if (this.peerConnection == null) {
165+
// special case when participant has no permission. -> no streams are transmitted but he must be shown as
166+
// connected
165167
_uiState.update { it.copy(mediaStream = null) }
166168
_uiState.update { it.copy(isAudioEnabled = false) }
167169
_uiState.update { it.copy(isStreamEnabled = false) }
170+
_uiState.update { it.copy(isConnected = true) }
168171
return
169172
}
170173

0 commit comments

Comments
 (0)