mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Improve (unused) code
This commit is contained in:
parent
cab447e44e
commit
112a7913d4
1 changed files with 4 additions and 5 deletions
|
@ -43,10 +43,9 @@ internal class DefaultPermalinkService @Inject constructor(
|
|||
}
|
||||
|
||||
override fun getLinkedId(url: String): String? {
|
||||
val isSupported = url.startsWith(MATRIX_TO_URL_BASE)
|
||||
|
||||
return if (isSupported) {
|
||||
url.substring(MATRIX_TO_URL_BASE.length)
|
||||
} else null
|
||||
return url
|
||||
.takeIf { it.startsWith(MATRIX_TO_URL_BASE) }
|
||||
?.substring(MATRIX_TO_URL_BASE.length)
|
||||
?.substringBeforeLast("?")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue