mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
parent
60f2e25007
commit
2438a09fd0
@ -147,15 +147,20 @@ public class CallNotificationController extends BaseController {
|
|||||||
@Override
|
@Override
|
||||||
public void onNext(ParticipantsOverall participantsOverall) {
|
public void onNext(ParticipantsOverall participantsOverall) {
|
||||||
boolean hasParticipantsInCall = false;
|
boolean hasParticipantsInCall = false;
|
||||||
|
boolean inCallOnDifferentDevice = false;
|
||||||
List<Participant> participantList = participantsOverall.getOcs().getData();
|
List<Participant> participantList = participantsOverall.getOcs().getData();
|
||||||
for (Participant participant : participantList) {
|
for (Participant participant : participantList) {
|
||||||
if (participant.isInCall()) {
|
if (participant.isInCall()) {
|
||||||
hasParticipantsInCall = true;
|
hasParticipantsInCall = true;
|
||||||
|
|
||||||
|
if (participant.getUserId().equals(userBeingCalled.getUserId())) {
|
||||||
|
inCallOnDifferentDevice = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasParticipantsInCall) {
|
if (!hasParticipantsInCall || inCallOnDifferentDevice) {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(() -> hangup());
|
getActivity().runOnUiThread(() -> hangup());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user