|
60 | 60 | import org.thoughtcrime.securesms.recipients.Recipient; |
61 | 61 | import org.thoughtcrime.securesms.recipients.RecipientId; |
62 | 62 | import org.thoughtcrime.securesms.ringrtc.CameraState; |
63 | | -import org.thoughtcrime.securesms.service.webrtc.PendingParticipantCollection; |
| 63 | +import org.thoughtcrime.securesms.service.webrtc.state.PendingParticipantsState; |
64 | 64 | import org.thoughtcrime.securesms.stories.viewer.reply.reaction.MultiReactionBurstLayout; |
65 | 65 | import org.thoughtcrime.securesms.util.BlurTransformation; |
66 | 66 | import org.thoughtcrime.securesms.util.ThrottledDebouncer; |
@@ -446,15 +446,20 @@ public void setPendingParticipantsViewListener(@Nullable PendingParticipantsView |
446 | 446 | pendingParticipantsViewListener = listener; |
447 | 447 | } |
448 | 448 |
|
449 | | - public void updatePendingParticipantsList(@NonNull PendingParticipantCollection pendingParticipantCollection) { |
450 | | - if (pendingParticipantCollection.getUnresolvedPendingParticipants().isEmpty()) { |
| 449 | + public void updatePendingParticipantsList(@NonNull PendingParticipantsState state) { |
| 450 | + if (state.isInPipMode()) { |
| 451 | + pendingParticipantsViewStub.setVisibility(View.GONE); |
| 452 | + return; |
| 453 | + } |
| 454 | + |
| 455 | + if (state.getPendingParticipantCollection().getUnresolvedPendingParticipants().isEmpty()) { |
451 | 456 | if (pendingParticipantsViewStub.resolved()) { |
452 | 457 | pendingParticipantsViewStub.get().setListener(pendingParticipantsViewListener); |
453 | | - pendingParticipantsViewStub.get().applyState(pendingParticipantCollection); |
| 458 | + pendingParticipantsViewStub.get().applyState(state.getPendingParticipantCollection()); |
454 | 459 | } |
455 | 460 | } else { |
456 | 461 | pendingParticipantsViewStub.get().setListener(pendingParticipantsViewListener); |
457 | | - pendingParticipantsViewStub.get().applyState(pendingParticipantCollection); |
| 462 | + pendingParticipantsViewStub.get().applyState(state.getPendingParticipantCollection()); |
458 | 463 | } |
459 | 464 | } |
460 | 465 |
|
@@ -525,10 +530,8 @@ public void updateCallParticipants(@NonNull CallParticipantsViewState callPartic |
525 | 530 | updateLocalCallParticipant(state.getLocalRenderState(), state.getLocalParticipant(), displaySmallSelfPipInLandscape); |
526 | 531 |
|
527 | 532 | if (state.isLargeVideoGroup()) { |
528 | | - moveSnackbarAboveParticipantRail(true); |
529 | 533 | adjustLayoutForLargeCount(); |
530 | 534 | } else { |
531 | | - moveSnackbarAboveParticipantRail(state.isViewingFocusedParticipant()); |
532 | 535 | adjustLayoutForSmallCount(); |
533 | 536 | } |
534 | 537 | } |
@@ -647,14 +650,6 @@ private void setStatus(@StringRes int statusRes) { |
647 | 650 | setStatus(getContext().getString(statusRes)); |
648 | 651 | } |
649 | 652 |
|
650 | | - private @NonNull View getPipBarrier() { |
651 | | - if (collapsedToolbar.isEnabled()) { |
652 | | - return collapsedToolbar; |
653 | | - } else { |
654 | | - return largeHeader; |
655 | | - } |
656 | | - } |
657 | | - |
658 | 653 | public void setStatusFromHangupType(@NonNull HangupMessage.Type hangupType) { |
659 | 654 | switch (hangupType) { |
660 | 655 | case NORMAL: |
@@ -904,28 +899,6 @@ private void adjustLayoutPositions(@NonNull LayoutPositions layoutPositions) { |
904 | 899 | constraintSet.applyTo(this); |
905 | 900 | } |
906 | 901 |
|
907 | | - private void moveSnackbarAboveParticipantRail(boolean aboveRail) { |
908 | | - if (aboveRail) { |
909 | | - updatePendingParticipantsBottomConstraint(callParticipantsRecycler); |
910 | | - } else { |
911 | | - updatePendingParticipantsBottomConstraint(aboveControlsGuideline); |
912 | | - } |
913 | | - } |
914 | | - |
915 | | - private void updatePendingParticipantsBottomConstraint(View anchor) { |
916 | | - ConstraintSet constraintSet = new ConstraintSet(); |
917 | | - constraintSet.setForceId(false); |
918 | | - constraintSet.clone(this); |
919 | | - |
920 | | - constraintSet.connect(R.id.call_screen_pending_recipients, |
921 | | - ConstraintSet.BOTTOM, |
922 | | - anchor.getId(), |
923 | | - ConstraintSet.TOP, |
924 | | - ViewUtil.dpToPx(8)); |
925 | | - |
926 | | - constraintSet.applyTo(this); |
927 | | - } |
928 | | - |
929 | 902 | private void fadeInNewUiState(boolean showSmallHeader) { |
930 | 903 | for (View view : SetUtil.difference(allTimeVisibleViews, visibleViewSet)) { |
931 | 904 | view.setVisibility(GONE); |
|
0 commit comments