Skip to content

Commit

Permalink
Reversed change that is no longer relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristoferAlexander committed Nov 22, 2023
1 parent 591367a commit a29009e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions alerts/src/iosMain/kotlin/AlertPresenter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ actual class AlertPresenter(
alert.message,
transform(alert.style),
).apply {
fun Alert.Action.isCancelAction(): Boolean = (this.style == Alert.Action.Style.CANCEL) or (this.style == Alert.Action.Style.NEGATIVE)
alert.actions.forEach { action ->
addAction(
UIAlertAction.actionWithTitle(
Expand All @@ -160,7 +159,7 @@ actual class AlertPresenter(
)
}
val cancelButtonIndex = alert.actions.indexOfFirst {
it.isCancelAction()
(it.style == Alert.Action.Style.CANCEL) or (it.style == Alert.Action.Style.NEGATIVE)
}
// If there is no Cancel action inject it by default for alerts if type ACTION_LIST
if (alert.style == Alert.Style.ACTION_LIST && cancelButtonIndex == -1) {
Expand Down

0 comments on commit a29009e

Please sign in to comment.