Skip to content

Instantly share code, notes, and snippets.

@raystatic
Created July 9, 2022 21:14
Show Gist options
  • Save raystatic/da73355abab04765b08ea6e1dbd4ce03 to your computer and use it in GitHub Desktop.
Save raystatic/da73355abab04765b08ea6e1dbd4ce03 to your computer and use it in GitHub Desktop.
class DefaultDeeplinkHandler constructor(
private val processors: Set<@JvmSuppressWildcards DeeplinkProcessor>
): DeeplinkHandler {
override fun process(deeplink: String): Boolean {
processors.forEach {
if (it.matches(deeplink)) {
it.execute(deeplink)
return true
}
}
return false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment