mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 14:52:13 -04:00
Little improvement in comment of the extension function.
This commit is contained in:
parent
6e5d487d38
commit
98f29b7757
@ -457,12 +457,12 @@ val String.addContentPrefix: String
|
|||||||
get() = if (startsWith(CONTENT_PREFIX)) this else CONTENT_PREFIX + this
|
get() = if (startsWith(CONTENT_PREFIX)) this else CONTENT_PREFIX + this
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handling the any error thrown by this method. Devs should handle the flow if this methods
|
* Handles any error thrown by this method. Developers should handle the flow if this method
|
||||||
* returns null. See https://github.com/kiwix/kiwix-android/issues/4157 for more details.
|
* returns null. For more details, see: https://github.com/kiwix/kiwix-android/issues/4157
|
||||||
*/
|
*/
|
||||||
fun Item.itemSize(): Long? = try {
|
fun Item.itemSize(): Long? = try {
|
||||||
size
|
size
|
||||||
} catch (ignore: Exception) {
|
} catch (ignore: Exception) {
|
||||||
Log.e(TAG, "Could not get the item size.\n Original exception = $ignore")
|
Log.e(TAG, "Could not retrieve the item size.\n Original exception: $ignore")
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user