Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fun <T> Collection<T>.joinToStringWithLimit(context: Context, limit: Int, transf

fun String.isHttpUrl() = startsWith("https://", ignoreCase = true) || startsWith("http://", ignoreCase = true)

fun String.isAnimatedImage() = endsWith(".gif", ignoreCase = true) || endsWith(".webp", ignoreCase = true)
fun String.isAnimatedImage() = substringBefore("?").run { endsWith(".gif", ignoreCase = true) || endsWith(".webp", ignoreCase = true) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use contains ?

and not all webp is animated, it can be static too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should add function to check webp images


fun concatStrings(context: Context, a: String?, b: String?): String? = when {
a.isNullOrEmpty() && b.isNullOrEmpty() -> null
Expand Down