mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 05:55:39 +03:00
improve code formatting for detekt score
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
838b14b9dc
commit
da1742f85c
3 changed files with 10 additions and 5 deletions
|
@ -48,13 +48,18 @@ class UriUtils {
|
||||||
|
|
||||||
fun isInstanceInternalFileUrl(baseUrl: String, url: String): Boolean {
|
fun isInstanceInternalFileUrl(baseUrl: String, url: String): Boolean {
|
||||||
// https://cloud.nextcloud.com/apps/files/?dir=/Engineering&fileid=41
|
// https://cloud.nextcloud.com/apps/files/?dir=/Engineering&fileid=41
|
||||||
return (url.startsWith("$baseUrl/apps/files/") || url.startsWith("$baseUrl/index.php/apps/files/")) &&
|
return (
|
||||||
Uri.parse(url).queryParameterNames.contains("fileid") && Regex(""".*fileid=\d*""").matches(url)
|
url.startsWith("$baseUrl/apps/files/") ||
|
||||||
|
url.startsWith("$baseUrl/index.php/apps/files/")
|
||||||
|
) &&
|
||||||
|
Uri.parse(url).queryParameterNames.contains("fileid") &&
|
||||||
|
Regex(""".*fileid=\d*""").matches(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isInstanceInternalFileUrlNew(baseUrl: String, url: String): Boolean {
|
fun isInstanceInternalFileUrlNew(baseUrl: String, url: String): Boolean {
|
||||||
// https://cloud.nextcloud.com/apps/files/files/41?dir=/
|
// https://cloud.nextcloud.com/apps/files/files/41?dir=/
|
||||||
return url.startsWith("$baseUrl/apps/files/files/") || url.startsWith("$baseUrl/index.php/apps/files/files/")
|
return url.startsWith("$baseUrl/apps/files/files/") ||
|
||||||
|
url.startsWith("$baseUrl/index.php/apps/files/files/")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun extractInstanceInternalFileFileIdNew(url: String): String {
|
fun extractInstanceInternalFileFileIdNew(url: String): String {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
build:
|
build:
|
||||||
maxIssues: 117
|
maxIssues: 116
|
||||||
weights:
|
weights:
|
||||||
# complexity: 2
|
# complexity: 2
|
||||||
# LongParameterList: 1
|
# LongParameterList: 1
|
||||||
|
|
Loading…
Reference in a new issue