chore: upgrade ktlint to 1.8.0 and format codebase (#1024)

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-08-31 12:27:40 +03:00
1 parent 3f3b853758
commit cfe3e736fd
66 files changed
+1287 -541

No files matched your search

@@ -76,7 +76,9 @@ object GatewayFileClient {
token: String,
path: String,
): String? {
val kind = com.m57.hermescontrol.ui.chat.mediaKindForPath(path)
val kind =
com.m57.hermescontrol.ui.chat
.mediaKindForPath(path)
val endpoint =
if (kind == com.m57.hermescontrol.ui.chat.MediaKind.AUDIO ||
kind == com.m57.hermescontrol.ui.chat.MediaKind.VIDEO
@@ -23,11 +23,21 @@ fun isLocalNetworkHost(host: String): Boolean {
val a = raw[0].toInt() and 0xFF
val b = raw[1].toInt() and 0xFF
return when {
a == 10 -> true // 10.0.0.0/8
a == 172 && b in 16..31 -> true // 172.16.0.0/12
a == 192 && b == 168 -> true // 192.168.0.0/16
a == 169 && b == 254 -> true // 169.254.0.0/16 link-local
a == 100 && b in 64..127 -> true // 100.64.0.0/10 CGNAT
a == 10 -> true
// 10.0.0.0/8
a == 172 && b in 16..31 -> true
// 172.16.0.0/12
a == 192 && b == 168 -> true
// 192.168.0.0/16
a == 169 && b == 254 -> true
// 169.254.0.0/16 link-local
a == 100 && b in 64..127 -> true
// 100.64.0.0/10 CGNAT
else -> false
}
}