kiwix-android
kiwix-android copied to clipboard
Improve and beautify getDecodedFileName method
Describe the bug Currently method is written as
getDecodedFileName(url: String?, src: String?): String =
url?.substringAfterLast("/", "")
?.takeIf { it.contains(".") }
?: src?.substringAfterLast("/", "")
?.substringAfterLast("%3A") ?: ""
Expected behavior We can beautify and improve this piece of method code.