Skip to content

Commit

Permalink
wip: Only three @deprecated remain, all worker related
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrjr committed Oct 13, 2023
1 parent 0206a53 commit 3ec72bc
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 177 deletions.
6 changes: 0 additions & 6 deletions workflow-ui/core-android/api/core-android.api
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ public abstract interface class com/squareup/workflow1/ui/AndroidScreen : com/sq
public abstract fun getViewFactory ()Lcom/squareup/workflow1/ui/ScreenViewFactory;
}

public final class com/squareup/workflow1/ui/EditTextsKt {
public static final fun setTextChangedListener (Landroid/widget/EditText;Lkotlin/jvm/functions/Function1;)V
public static final fun updateText (Landroid/widget/EditText;Ljava/lang/CharSequence;)V
}

public final class com/squareup/workflow1/ui/LayoutScreenViewFactory : com/squareup/workflow1/ui/ScreenViewFactory {
public fun <init> (Lkotlin/reflect/KClass;ILkotlin/jvm/functions/Function1;)V
public fun buildView (Lcom/squareup/workflow1/ui/Screen;Lcom/squareup/workflow1/ui/ViewEnvironment;Landroid/content/Context;Landroid/view/ViewGroup;)Lcom/squareup/workflow1/ui/ScreenViewHolder;
Expand Down Expand Up @@ -226,7 +221,6 @@ public final class com/squareup/workflow1/ui/container/BackButtonScreen : com/sq
public final fun getOnBackPressed ()Lkotlin/jvm/functions/Function0;
public final fun getShadow ()Z
public fun getViewFactory ()Lcom/squareup/workflow1/ui/ScreenViewFactory;
public final fun getWrapped ()Lcom/squareup/workflow1/ui/Screen;
public synthetic fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/Container;
public synthetic fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/Wrapper;
public fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/container/BackButtonScreen;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,4 @@ public class BackButtonScreen<C : Screen>(
view.setBackHandler(backButtonScreen.onBackPressed)
}
}

@Deprecated("Use content", ReplaceWith("content"))
public val wrapped: C = content
}
6 changes: 0 additions & 6 deletions workflow-ui/core-common/api/core-common.api
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public final class com/squareup/workflow1/ui/NamedScreen : com/squareup/workflow
public fun getContent ()Lcom/squareup/workflow1/ui/Screen;
public synthetic fun getContent ()Ljava/lang/Object;
public final fun getName ()Ljava/lang/String;
public final fun getWrapped ()Lcom/squareup/workflow1/ui/Screen;
public fun hashCode ()I
public synthetic fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/Container;
public fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/NamedScreen;
Expand Down Expand Up @@ -68,7 +67,6 @@ public final class com/squareup/workflow1/ui/ViewEnvironment$Companion {

public abstract class com/squareup/workflow1/ui/ViewEnvironmentKey {
public fun <init> ()V
public fun <init> (Lkotlin/reflect/KClass;)V
public fun combine (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
public final fun equals (Ljava/lang/Object;)Z
public abstract fun getDefault ()Ljava/lang/Object;
Expand Down Expand Up @@ -182,7 +180,6 @@ public final class com/squareup/workflow1/ui/container/BackStackConfigKt {

public final class com/squareup/workflow1/ui/container/BackStackScreen : com/squareup/workflow1/ui/Container, com/squareup/workflow1/ui/Screen {
public static final field Companion Lcom/squareup/workflow1/ui/container/BackStackScreen$Companion;
public fun <init> (Lcom/squareup/workflow1/ui/Screen;Ljava/util/List;)V
public fun <init> (Lcom/squareup/workflow1/ui/Screen;[Lcom/squareup/workflow1/ui/Screen;)V
public synthetic fun <init> (Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun asSequence ()Lkotlin/sequences/Sequence;
Expand Down Expand Up @@ -212,13 +209,11 @@ public final class com/squareup/workflow1/ui/container/BackStackScreenKt {
public final class com/squareup/workflow1/ui/container/BodyAndOverlaysScreen : com/squareup/workflow1/ui/Compatible, com/squareup/workflow1/ui/Screen {
public fun <init> (Lcom/squareup/workflow1/ui/Screen;Ljava/util/List;Ljava/lang/String;)V
public synthetic fun <init> (Lcom/squareup/workflow1/ui/Screen;Ljava/util/List;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Lcom/squareup/workflow1/ui/Screen;[Lcom/squareup/workflow1/ui/container/Overlay;)V
public final fun getBody ()Lcom/squareup/workflow1/ui/Screen;
public fun getCompatibilityKey ()Ljava/lang/String;
public final fun getName ()Ljava/lang/String;
public final fun getOverlays ()Ljava/util/List;
public final fun mapBody (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/container/BodyAndOverlaysScreen;
public final fun mapModals (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/container/BodyAndOverlaysScreen;
public final fun mapOverlays (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/container/BodyAndOverlaysScreen;
}

Expand All @@ -230,7 +225,6 @@ public final class com/squareup/workflow1/ui/container/EnvironmentScreen : com/s
public fun getContent ()Lcom/squareup/workflow1/ui/Screen;
public synthetic fun getContent ()Ljava/lang/Object;
public final fun getEnvironment ()Lcom/squareup/workflow1/ui/ViewEnvironment;
public final fun getWrapped ()Lcom/squareup/workflow1/ui/Screen;
public synthetic fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/Container;
public synthetic fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/Wrapper;
public fun map (Lkotlin/jvm/functions/Function1;)Lcom/squareup/workflow1/ui/container/EnvironmentScreen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ public data class NamedScreen<C : Screen>(

override val compatibilityKey: String = Compatible.keyFor(content, "NamedScreen:$name")

@Deprecated("Use content", ReplaceWith("content"))
public val wrapped: C = content

override fun <D : Screen> map(transform: (C) -> D): NamedScreen<D> =
NamedScreen(transform(content), name)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ private constructor(
* for an example.
*/
@WorkflowUiExperimentalApi
public abstract class ViewEnvironmentKey<T : Any>() {
@Deprecated("Use no args constructor", ReplaceWith("ViewEnvironmentKey<T>()"))
public constructor(@Suppress("UNUSED_PARAMETER") type: KClass<T>) : this()

public abstract class ViewEnvironmentKey<T : Any> {
/**
* Defines the default value for this key. It is a grievous error for this value to be
* dynamic in any way.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ public class BackStackScreen<StackedT : Screen> private constructor(
vararg rest: StackedT
) : this(listOf(bottom) + rest)

@Deprecated(
"Use fromList",
ReplaceWith("BackStackScreen.fromList(listOf(bottom) + rest)")
)
public constructor(
bottom: StackedT,
rest: List<StackedT>
) : this(listOf(bottom) + rest)

override fun asSequence(): Sequence<StackedT> = frames.asSequence()

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,11 @@ public class BodyAndOverlaysScreen<B : Screen, O : Overlay>(
) : Screen, Compatible {
override val compatibilityKey: String = keyFor(this, name)

@Deprecated(
"Use list-based constructor",
ReplaceWith("BodyAndOverlaysScreen(body, listOf(*modals))")
)
public constructor(
body: B,
vararg modals: O
) : this(body, modals.toList())

public fun <S : Screen> mapBody(transform: (B) -> S): BodyAndOverlaysScreen<S, O> {
return BodyAndOverlaysScreen(transform(body), overlays, name)
}

public fun <N : Overlay> mapOverlays(transform: (O) -> N): BodyAndOverlaysScreen<B, N> {
return BodyAndOverlaysScreen(body, overlays.map(transform), name)
}

@Deprecated("Use mapOverlays", ReplaceWith("this.mapOverlays"))
public fun <N : Overlay> mapModals(transform: (O) -> N): BodyAndOverlaysScreen<B, N> {
return mapOverlays(transform)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,15 @@ public class EnvironmentScreen<C : Screen>(
) : Wrapper<Screen, C>, Screen {
override fun <D : Screen> map(transform: (C) -> D): EnvironmentScreen<D> =
EnvironmentScreen(transform(content), environment)

@Deprecated("Use content", ReplaceWith("content"))
public val wrapped: C = content
}

/**
* Returns an [EnvironmentScreen] derived from the receiver, whose
* [EnvironmentScreen.environment] includes [viewRegistry].
*
* If the receiver is an [EnvironmentScreen], uses [ViewRegistry.merge]
* to preserve the [ViewRegistry] entries of both.
* If the receiver is an [EnvironmentScreen], uses
* [ViewRegistry.merge][com.squareup.workflow1.ui.merge] to preserve the [ViewRegistry]
* entries of both.
*/
@WorkflowUiExperimentalApi
public fun Screen.withRegistry(viewRegistry: ViewRegistry): EnvironmentScreen<*> {
Expand All @@ -43,8 +41,9 @@ public fun Screen.withRegistry(viewRegistry: ViewRegistry): EnvironmentScreen<*>
* Returns an [EnvironmentScreen] derived from the receiver,
* whose [EnvironmentScreen.environment] includes the values in the given [environment].
*
* If the receiver is an [EnvironmentScreen], uses [ViewEnvironment.merge]
* to preserve the [ViewRegistry] entries of both.
* If the receiver is an [EnvironmentScreen], uses
* [ViewRegistry.merge][com.squareup.workflow1.ui.merge] to preserve the [ViewRegistry]
* entries of both.
*/
@WorkflowUiExperimentalApi
public fun Screen.withEnvironment(
Expand Down

0 comments on commit 3ec72bc

Please sign in to comment.