diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt index 579d4111b1..1c67ac0fb3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt @@ -6,14 +6,18 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.Icon +import androidx.compose.material.IconButton import androidx.compose.material.Text import androidx.compose.material.TextButton import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.RectangleShape +import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import network.loki.messenger.R import org.thoughtcrime.securesms.ui.color.LocalColors import org.thoughtcrime.securesms.ui.components.BorderlessButton @@ -36,6 +40,13 @@ fun AlertDialog( backgroundColor = LocalColors.current.backgroundSecondary, buttons = { Box { + IconButton( + onClick = onDismissRequest, + modifier = Modifier.align(Alignment.TopEnd) + ) { + Icon(painter = painterResource(id = R.drawable.ic_dialog_x), tint = LocalColors.current.text, contentDescription = "back") + } + Column(modifier = Modifier.fillMaxWidth()) { Column( horizontalAlignment = Alignment.CenterHorizontally, diff --git a/app/src/main/res/drawable/ic_dialog_x.xml b/app/src/main/res/drawable/ic_dialog_x.xml new file mode 100644 index 0000000000..a65f2abb88 --- /dev/null +++ b/app/src/main/res/drawable/ic_dialog_x.xml @@ -0,0 +1,13 @@ + + +