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
|
||||
public void onNext(ParticipantsOverall participantsOverall) {
|
||||
boolean hasParticipantsInCall = false;
|
||||
boolean inCallOnDifferentDevice = false;
|
||||
List<Participant> participantList = participantsOverall.getOcs().getData();
|
||||
for (Participant participant : participantList) {
|
||||
if (participant.isInCall()) {
|
||||
hasParticipantsInCall = true;
|
||||
|
||||
if (participant.getUserId().equals(userBeingCalled.getUserId())) {
|
||||
inCallOnDifferentDevice = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasParticipantsInCall) {
|
||||
if (!hasParticipantsInCall || inCallOnDifferentDevice) {
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(() -> hangup());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user