refactor: remove verified dead code across data, UI, and resources (#680)
* refactor: remove unused dead code across data, UI, and resources * fix: resolve dangling references left by dead-code removal Restore empty object Motion (braces required) and remove the 12 stale test usages that still called the now-deleted production symbols: - ServerStoreTest: removeServer/switchToServer tests - ServerEndpointTest: isCleartext assertions - ConnectViewModelTest: onHostChange/onPortChange tests + 3 dropped R.string refs - SettingsViewModelTest: renameProfile tests + clearNavigateToLogin - E2eIntegrationTest: previewSkill tests + onHostChange/onPortChange calls Verified locally: compileDebugUnitTestKotlin + 48 tests pass. * fix: remove unused imports flagged by ktlint Drops 4 no-longer-referenced imports left by the dead-code removal: - HermesApiService: SkillScanResponse (scanHubSkill removed) - ServerEndpointTest: assertFalse, assertTrue (isCleartext assertions dropped) - SettingsViewModelTest: assertFalse (rename tests removed) --------- Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
1 parent
58420d7b2a
commit
2e97ee9a84
29 files changed
+10
-550
No files matched your search
@@ -450,18 +450,6 @@ object AuthManager {
|
||||
|
||||
fun getPort(): Int = serverStore.getLatestState().resolvedPort
|
||||
|
||||
fun setHost(host: String) {
|
||||
val endpoint = endpoint()
|
||||
val normalizedHost = host.trim().removePrefix("[").removeSuffix("]")
|
||||
setBaseUrl(endpoint.baseUrl.newBuilder().host(normalizedHost).build().toString())
|
||||
}
|
||||
|
||||
fun setPort(port: Int) {
|
||||
require(port in 1..65535) { "Port is out of range" }
|
||||
val endpoint = endpoint()
|
||||
setBaseUrl(endpoint.baseUrl.newBuilder().port(port).build().toString())
|
||||
}
|
||||
|
||||
// ── Auto-reconnect ───────────────────────────────────────────────────
|
||||
|
||||
fun isAutoReconnect(): Boolean = serverStore.getLatestState().autoReconnect
|
||||
|
||||
Reference in new issue
Block a user