Modern Apps git

← Modern-Apps.git

web: fix detekt findings

Commit
d9d586249cfeef67189610b717c50ceeb8ac045d
Author
Vayun Mathur <[email protected]>
When
2026-11-17 15:16 UTC (18 days ago)
Parents
c79e4ca
Fixes every error-severity detekt finding in web (inventory clusters C3/C4): named constants for magic numbers, extracted functions/composables for long/complex methods, wrapped long lines, removed unused parameters, and narrowed/logged exception handling. No detekt config, baseline or suppression changes; behaviour preserved.

Verified: ./check web and :web:testDevUnitTest green.

Diff

web/src/main/java/com/vayunmathur/web/platform/WebViewModel.kt
diff --git a/web/src/main/java/com/vayunmathur/web/platform/WebViewModel.kt b/web/src/main/java/com/vayunmathur/web/platform/WebViewModel.ktindex a932553acc..8278a68709 100644--- a/web/src/main/java/com/vayunmathur/web/platform/WebViewModel.kt+++ b/web/src/main/java/com/vayunmathur/web/platform/WebViewModel.kt@@ -72,7 +72,10 @@ class WebViewModel(     val originStateClearer: OriginStateClearer = WebViewCookieClearer, ) : AndroidViewModel(application) { -    /** The application context, via [AndroidViewModel.getApplication]: a ViewModel outlives any Activity, so no Activity context is ever held. */+    /**+     * The application context, via [AndroidViewModel.getApplication]: a ViewModel outlives+     * any Activity, so no Activity context is ever held.+     */     internal val context: Context get() = getApplication()      /** Secondary constructor for callers (tests, the factory) that hold a plain [Context]. */