Prevent having two or more ZRTP SAS dialog stacked

This commit is contained in:
Sylvain Berfini 2025-01-20 14:55:53 +01:00
parent fa9bcd3475
commit e283b7b48e

View file

@ -447,6 +447,10 @@ class ActiveCallFragment : GenericCallFragment() {
authTokensToListen: List<String>,
cacheMismatch: Boolean
) {
if (zrtpSasDialog != null) {
zrtpSasDialog?.dismiss()
}
val model = ZrtpSasConfirmationDialogModel(
authTokenToRead,
authTokensToListen,
@ -476,6 +480,10 @@ class ActiveCallFragment : GenericCallFragment() {
}
private fun showZrtpAlertDialog(allowTryAgain: Boolean = true) {
if (zrtpSasDialog != null) {
zrtpSasDialog?.dismiss()
}
val model = ZrtpAlertDialogModel(allowTryAgain)
val dialog = DialogUtils.getZrtpAlertDialog(requireActivity(), model)