Improve (unused) code
This commit is contained in:
parent
cab447e44e
commit
112a7913d4
@ -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…
x
Reference in New Issue
Block a user