FIxed showing of main activity alerts

This commit is contained in:
Juha Heinanen
2025-04-15 20:01:32 +03:00
parent 32c2a2229d
commit 7ba07df7db

View File

@ -136,6 +136,7 @@ import com.tutpro.baresip.CustomElements.AlertDialog
import com.tutpro.baresip.CustomElements.Checkbox
import com.tutpro.baresip.CustomElements.DropdownMenu
import com.tutpro.baresip.CustomElements.LabelText
import com.tutpro.baresip.CustomElements.PasswordDialog
import com.tutpro.baresip.CustomElements.PullToRefreshBox
import com.tutpro.baresip.CustomElements.SelectableAlertDialog
import com.tutpro.baresip.CustomElements.Text
@ -513,6 +514,15 @@ class MainActivity : ComponentActivity() {
}
}
if (showAlert.value) {
AlertDialog(
showDialog = showAlert,
title = alertTitle.value,
message = alertMessage.value,
positiveButtonText = stringResource(R.string.ok),
)
}
if (showDialog.value)
AlertDialog(
showDialog = showDialog,
@ -1828,7 +1838,7 @@ class MainActivity : ComponentActivity() {
val params = account.substringAfter(">")
if (Utils.paramValue(params, "auth_user") != "" && Utils.paramValue(params, "auth_pass") == "") {
val aor = account.substringAfter("<").substringBefore(">")
CustomElements.PasswordDialog(
PasswordDialog(
ctx = ctx,
showPasswordDialog = showPasswordsDialog,
password = password,