Closed ArnyminerZ closed 2 weeks ago
Also, since lastSegment
doesn't have any parameters, I'd replace the function:
fun HttpUrl.lastSegment(): String =
pathSegments.lastOrNull { it.isNotEmpty() } ?: "/"
by a variable
val HttpUrl.lastSegment: String
get() = pathSegments.lastOrNull { it.isNotEmpty() } ?: "/"
At the end, for the Java conversion it's the same, but it's shorter to write 😅
by a variable
Yes please do so :)
The PR should be in Draft state during development. As soon as it's finished, it should be marked as Ready for review and a reviewer should be chosen.
See also: Writing A Great Pull Request Description
Purpose
Replaces all the usages of the deprecated
DavUtils.lastSegmentOfUrl
by the extension function ofUrl
(lastSegment()
).Short description
replaceWith
to the annotation.DavUtils.lastSegmentOfUrl
may be removed if desired.Checklist