mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Code quality and remove reference to DefaultMatrixToConverter.SUPPORTED_PATHS in MatrixToConverter
This commit is contained in:
-1
@@ -24,7 +24,6 @@ import android.net.Uri
|
||||
interface MatrixToConverter {
|
||||
/**
|
||||
* Try to convert a URL from an element web instance or from a client permalink to a matrix.to url.
|
||||
* To be successfully converted, URL path should contain one of the [DefaultMatrixToConverter.SUPPORTED_PATHS].
|
||||
* Examples:
|
||||
* - https://riot.im/develop/#/room/#element-android:matrix.org -> https://matrix.to/#/#element-android:matrix.org
|
||||
* - https://app.element.io/#/room/#element-android:matrix.org -> https://matrix.to/#/#element-android:matrix.org
|
||||
|
||||
+7
-5
@@ -53,9 +53,11 @@ class DefaultMatrixToConverter @Inject constructor() : MatrixToConverter {
|
||||
}
|
||||
}
|
||||
|
||||
private val SUPPORTED_PATHS = listOf(
|
||||
"/#/room/",
|
||||
"/#/user/",
|
||||
"/#/group/"
|
||||
)
|
||||
companion object {
|
||||
val SUPPORTED_PATHS = listOf(
|
||||
"/#/room/",
|
||||
"/#/user/",
|
||||
"/#/group/"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import io.element.android.libraries.matrix.api.permalink.PermalinkData
|
||||
import io.element.android.libraries.matrix.api.permalink.PermalinkParser
|
||||
|
||||
class FakePermalinkParser(
|
||||
private var result: () -> PermalinkData = { throw Exception("Not implemented") }
|
||||
private var result: () -> PermalinkData = { TODO("Not implemented") }
|
||||
) : PermalinkParser {
|
||||
fun givenResult(result: PermalinkData) {
|
||||
this.result = { result }
|
||||
|
||||
Reference in New Issue
Block a user