mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-23 13:35:33 +03:00
Move "hasMCU" update to the top of the method
"hasMCU" was used before being updated, so this caused an unneeded call to "getPeersForCall" when processing the users in the room for the first time even if the MCU is actually used. A better fix might be moving "hasMCU" to a method instead of relying on the cached value, but just moving the update to the top of the method should have no side effects (as calling "getPeersForCall" just updates "participantMap", which is unused when the MCU is used, and sets the avatars, which has no effect until the peer layout is set, which also sets the avatar), so this is good enough for now. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
8adfb7c2cd
commit
004c7b296a
1 changed files with 2 additions and 2 deletions
|
@ -1655,6 +1655,8 @@ public class CallController extends BaseController {
|
|||
List<String> newSessions = new ArrayList<>();
|
||||
Set<String> oldSesssions = new HashSet<>();
|
||||
|
||||
hasMCU = hasExternalSignalingServer && webSocketClient != null && webSocketClient.hasMCU();
|
||||
|
||||
for (HashMap<String, Object> participant : users) {
|
||||
if (!participant.get("sessionId").equals(callSession)) {
|
||||
Object inCallObject = participant.get("inCall");
|
||||
|
@ -1693,8 +1695,6 @@ public class CallController extends BaseController {
|
|||
getPeersForCall();
|
||||
}
|
||||
|
||||
hasMCU = hasExternalSignalingServer && webSocketClient != null && webSocketClient.hasMCU();
|
||||
|
||||
for (String sessionId : newSessions) {
|
||||
getPeerConnectionWrapperForSessionIdAndType(sessionId, "video", hasMCU && sessionId.equals(webSocketClient.getSessionId()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue