I took a look at what is required to support Wear ...
# confetti
y
I took a look at what is required to support Wear navigation if we drop Compose Navigation. Seems reasonably straightforward. https://github.com/xxfast/NYTimes-KMP/pull/15
🙌 1
👍 1
You basically end up with this thing observing and popping off the top destination
Copy code
SwipeToDismissBox(
      onDismissed = { router.pop() },
      state = rememberSwipeToDismissBoxState(),
      backgroundKey = background?.configuration ?: SwipeToDismissKeys.Background,
      hasBackground = background != null,
      contentKey = active.configuration,
    ) { isBackground ->
      val child = if (isBackground) requireNotNull(background) else active
      holder.SaveableStateProvider(child.configuration.key()) {
        CompositionLocalProvider(LocalComponentContext provides child.instance) {
          HierarchicalFocusCoordinator(requiresFocus = { !isBackground }) {
            content(child.configuration)
          }
        }
      }
    }
Voyager already had this as a sample https://github.com/adrielcafe/voyager/issues/81
x
I've moved some of your implementations over to decompose-router-wear module. Thanks again @yschimke for your contributions
y
Awesome, I think Arkadii wrote most of it