Skip to content

Commit

Permalink
Forgot to undeprecate a couple of pre-Overlay things.
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrjr committed Oct 12, 2023
1 parent 0a14ba0 commit 8e7731b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// @file:Suppress("DEPRECATION")

package com.squareup.workflow1.ui.modal

import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
Expand All @@ -14,14 +12,15 @@ import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
*
* @param B the type of [beneathModals]
*/
@Suppress("DEPRECATION")
@WorkflowUiExperimentalApi
// @Deprecated(
// "Use BodyAndModalsScreen and AlertOverlay",
// ReplaceWith(
// "BodyAndModalsScreen<B>(beneathModals, modals)",
// "com.squareup.workflow1.ui.container.BodyAndModalsScreen"
// )
// )
@Deprecated(
"Use BodyAndModalsScreen and AlertOverlay",
ReplaceWith(
"BodyAndModalsScreen<B>(beneathModals, modals)",
"com.squareup.workflow1.ui.container.BodyAndModalsScreen"
)
)
public data class AlertContainerScreen<B : Any>(
override val beneathModals: B,
override val modals: List<AlertScreen> = emptyList()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// @file:Suppress("DEPRECATION")

package com.squareup.workflow1.ui.modal

import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
Expand All @@ -11,13 +9,13 @@ import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
* Models a typical "You sure about that?" alert box.
*/
@WorkflowUiExperimentalApi
// @Deprecated(
// "Use AlertOverlay",
// ReplaceWith(
// "AlertOverlay(buttons, message, title, cancelable, onEvent)",
// "com.squareup.workflow1.ui.container.AlertOverlay"
// )
// )
@Deprecated(
"Use AlertOverlay",
ReplaceWith(
"AlertOverlay(buttons, message, title, cancelable, onEvent)",
"com.squareup.workflow1.ui.container.AlertOverlay"
)
)
public data class AlertScreen(
val buttons: Map<Button, String> = emptyMap(),
val message: String = "",
Expand All @@ -41,6 +39,7 @@ public data class AlertScreen(
if (this === other) return true
if (javaClass != other?.javaClass) return false

@Suppress("DEPRECATION")
other as AlertScreen

return buttons == other.buttons &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.squareup.workflow1.ui.WorkflowUiExperimentalApi
* like `ModalContainer` in the `workflow-ui:core-android` module.
*/
@WorkflowUiExperimentalApi
// @Deprecated("Use BodyAndModalsScreen")
@Deprecated("Use BodyAndModalsScreen")
public interface HasModals<out B : Any, out M : Any> {
public val beneathModals: B
public val modals: List<M>
Expand Down

0 comments on commit 8e7731b

Please sign in to comment.