Skip to content

Commit

Permalink
Rename method for consistency with scrolling to anchor proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
jayohms committed Feb 23, 2024
1 parent 2be76bb commit 2fc9f3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion turbo/src/main/assets/js/turbo_bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
Turbo.navigator.view.scrollToAnchorFromLocation(location)
} else if (window.Turbo && Turbo.navigator.location?.href === location.href) {
// Refresh the page without native proposal
TurboSession.visitProposalIsPageRefresh(location.toString(), JSON.stringify(options))
TurboSession.visitProposalRefreshingPage(location.toString(), JSON.stringify(options))
this.visitLocationWithOptionsAndRestorationIdentifier(location, JSON.stringify(options), Turbo.navigator.restorationIdentifier)
} else {
// Propose the visit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ class TurboSession internal constructor(
* @param optionsJson A JSON block to be serialized into [TurboVisitOptions].
*/
@JavascriptInterface
fun visitProposalIsPageRefresh(location: String, optionsJson: String) {
fun visitProposalRefreshingPage(location: String, optionsJson: String) {
val options = TurboVisitOptions.fromJSON(optionsJson) ?: return
logEvent("visitProposalIsPageRefresh", "location" to location, "options" to options)
logEvent("visitProposalRefreshingPage", "location" to location, "options" to options)
}

/**
Expand Down

0 comments on commit 2fc9f3c

Please sign in to comment.