Skip to content

Commit

Permalink
Update circuit to v0.26.1 (#1842)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zac Sweers <[email protected]>
  • Loading branch information
renovate[bot] and ZacSweers authored Feb 22, 2025
1 parent 2155bc7 commit 692b347
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ import catchup.compose.rememberStableCoroutineScope
import catchup.di.AppScope
import coil.request.ImageRequest.Builder
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import com.slack.circuit.backstack.NavDecoration
import com.slack.circuit.codegen.annotations.CircuitInject
import com.slack.circuit.foundation.NavigatorDefaults
import com.slack.circuit.foundation.RecordContentProvider
import com.slack.circuit.overlay.LocalOverlayHost
import com.slack.circuit.overlay.OverlayHost
import com.slack.circuit.runtime.CircuitUiEvent
Expand All @@ -62,7 +59,6 @@ import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
import dev.zacsweers.catchup.app.scaffold.R
import kotlinx.collections.immutable.ImmutableList
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import kotlinx.parcelize.Parcelize
Expand Down Expand Up @@ -243,25 +239,3 @@ private fun launchShareSheet(scope: CoroutineScope, overlayHost: OverlayHost, st
)
state.eventSink(result)
}

// TODO
// generalize this when there's a factory pattern for it in Circuit
// shared element transitions?
class ImageViewerAwareNavDecoration : NavDecoration {
@Composable
override fun <T> DecoratedContent(
args: ImmutableList<T>,
backStackDepth: Int,
modifier: Modifier,
content: @Composable (T) -> Unit,
) {
val arg = args.first()
val decoration =
if (arg is RecordContentProvider<*> && arg.record.screen is ImageViewerScreen) {
NavigatorDefaults.EmptyDecoration
} else {
NavigatorDefaults.DefaultDecoration
}
decoration.DecoratedContent(args, backStackDepth, modifier, content)
}
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ compose-material3 = "1.3.1"
emoji = "1.2.0-alpha03"
anvil = "0.4.1"
apollo = "4.0.0-beta.7"
circuit = "0.25.0"
circuit = "0.26.1"
coil = "2.7.0"
compose = "1.7.8"
compose-jb = "1.7.0"
Expand Down

0 comments on commit 692b347

Please sign in to comment.