Created
April 17, 2026 17:28
-
-
Save AndroidPoet/67424c81ca5bd2476358e0bd8d66d9f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun parseDeepLink(link: String): Route? { | |
| return try { | |
| when { | |
| link.contains("/article/") -> Route.Article(link.substringAfterLast("/")) | |
| else -> null | |
| } | |
| } catch (e: Exception) { | |
| Log.e("DeepLink", "Failed to parse", e) | |
| null | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment