Media: fix zoomable image with non content uri
This commit is contained in:
parent
319f426b06
commit
5c198bc279
4 changed files with 76 additions and 9 deletions
|
|
@ -18,8 +18,12 @@ package io.element.android.libraries.androidutils.uri
|
|||
|
||||
import android.net.Uri
|
||||
|
||||
const val ASSET_FILE_PATH_ROOT = "android_asset"
|
||||
const val IGNORED_SCHEMA = "ignored"
|
||||
|
||||
fun Uri.isIgnored() = scheme == IGNORED_SCHEMA
|
||||
|
||||
fun createIgnoredUri(path: String): Uri = Uri.parse("$IGNORED_SCHEMA://$path")
|
||||
|
||||
val Uri.firstPathSegment: String?
|
||||
get() = pathSegments.firstOrNull()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue