Fix issue with bottom sheets.

This commit is contained in:
Alex Hart
2023-01-31 10:00:25 -04:00
parent 691520bc75
commit e90074ffef
18 changed files with 120 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ import org.thoughtcrime.securesms.mediasend.v2.MediaSelectionState;
import org.thoughtcrime.securesms.mediasend.v2.MediaSelectionViewModel;
import org.thoughtcrime.securesms.mms.SentMediaQuality;
import org.thoughtcrime.securesms.util.BottomSheetUtil;
import org.thoughtcrime.securesms.util.WindowUtil;
import org.thoughtcrime.securesms.util.views.CheckedLinearLayout;
/**
@@ -67,6 +68,12 @@ public final class QualitySelectorBottomSheetDialog extends BottomSheetDialogFra
viewModel.getState().observe(getViewLifecycleOwner(), this::updateQuality);
}
@Override
public void onResume() {
super.onResume();
WindowUtil.initializeScreenshotSecurity(requireContext(), requireDialog().getWindow());
}
private void updateQuality(@NonNull MediaSelectionState selectionState) {
select(selectionState.getQuality() == SentMediaQuality.STANDARD ? standard : high);
}