Skip to content

Commit

Permalink
Rename FocusForwarder modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
saket committed Jul 20, 2024
1 parent 95a0ba6 commit 039c8c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import me.saket.telephoto.subsamplingimage.rememberSubSamplingImageState
import me.saket.telephoto.zoomable.internal.FocusForwarder
import me.saket.telephoto.zoomable.internal.PlaceholderBoundsProvider
import me.saket.telephoto.zoomable.internal.focusForwarder
import me.saket.telephoto.zoomable.internal.focusable
import me.saket.telephoto.zoomable.internal.receiveFocusFrom
import me.saket.telephoto.zoomable.internal.scaledToMatch

/**
Expand Down Expand Up @@ -167,7 +167,7 @@ fun ZoomableImage(
}

val zoomable = Modifier
.focusable(focusForwarder)
.receiveFocusFrom(focusForwarder)
.zoomable(
state = state.zoomableState,
enabled = gesturesEnabled && !state.isPlaceholderDisplayed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal fun Modifier.focusForwarder(forwarder: FocusForwarder, enabled: Boolean
}

/** Intended for the composable that will receive forwarded focus. */
internal fun Modifier.focusable(forwarder: FocusForwarder): Modifier {
internal fun Modifier.receiveFocusFrom(forwarder: FocusForwarder): Modifier {
return this
.focusRequester(forwarder.childFocusRequester)
.onFocusChanged { forwarder.isChildFocused = it.isFocused }
Expand Down

0 comments on commit 039c8c3

Please sign in to comment.