diff --git a/readium/navigator/src/main/java/org/readium/r2/navigator/HyperlinkNavigator.kt b/readium/navigator/src/main/java/org/readium/r2/navigator/HyperlinkNavigator.kt index 47e4303d10..dfec75fe0b 100644 --- a/readium/navigator/src/main/java/org/readium/r2/navigator/HyperlinkNavigator.kt +++ b/readium/navigator/src/main/java/org/readium/r2/navigator/HyperlinkNavigator.kt @@ -35,6 +35,6 @@ public interface HyperlinkNavigator : Navigator { * Called when a link to an external URL was clicked in the navigator. */ @ExperimentalReadiumApi - public fun onOpenExternalLinkRequested(url: AbsoluteUrl) + public fun onExternalLinkClicked(url: AbsoluteUrl) } } diff --git a/readium/navigator/src/main/java/org/readium/r2/navigator/epub/EpubNavigatorViewModel.kt b/readium/navigator/src/main/java/org/readium/r2/navigator/epub/EpubNavigatorViewModel.kt index c8a2f39857..c0d1a1afdf 100644 --- a/readium/navigator/src/main/java/org/readium/r2/navigator/epub/EpubNavigatorViewModel.kt +++ b/readium/navigator/src/main/java/org/readium/r2/navigator/epub/EpubNavigatorViewModel.kt @@ -181,7 +181,7 @@ internal class EpubNavigatorViewModel( _events.send(Event.OpenInternalLink(link)) } } else { - listener?.onOpenExternalLinkRequested(url) + listener?.onExternalLinkClicked(url) } } diff --git a/test-app/src/main/java/org/readium/r2/testapp/reader/ReaderViewModel.kt b/test-app/src/main/java/org/readium/r2/testapp/reader/ReaderViewModel.kt index 26f972c465..bfcfb2bb26 100644 --- a/test-app/src/main/java/org/readium/r2/testapp/reader/ReaderViewModel.kt +++ b/test-app/src/main/java/org/readium/r2/testapp/reader/ReaderViewModel.kt @@ -260,7 +260,7 @@ class ReaderViewModel( } // HyperlinkNavigator.Listener - override fun onOpenExternalLinkRequested(url: AbsoluteUrl) { + override fun onExternalLinkClicked(url: AbsoluteUrl) { activityChannel.send(ActivityCommand.OpenExternalLink(url)) }