everysync: fix detekt findings
- Commit
0cf0eb1c0e61820b8e35e2544e2a8276d074af59- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-17 15:16 UTC (18 days ago)
- Parents
8ebbdb2
Fixes every error-severity detekt finding in everysync (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 everysync and :everysync:testDevUnitTest green.
Diff
everysync/src/main/java/com/vayunmathur/everysync/platform/EverySyncViewModel.kt
diff --git a/everysync/src/main/java/com/vayunmathur/everysync/platform/EverySyncViewModel.kt b/everysync/src/main/java/com/vayunmathur/everysync/platform/EverySyncViewModel.ktindex 74b7009b6c..c47fb7e34c 100644--- a/everysync/src/main/java/com/vayunmathur/everysync/platform/EverySyncViewModel.kt+++ b/everysync/src/main/java/com/vayunmathur/everysync/platform/EverySyncViewModel.kt@@ -197,7 +197,8 @@ class EverySyncViewModel(app: Application) : AndroidViewModel(app) { withContext(Dispatchers.Main) { announce( if (count != null) {- getApplication<Application>().resources.getQuantityString(R.plurals.snapshot_restored, count, count)+ getApplication<Application>().resources+ .getQuantityString(R.plurals.snapshot_restored, count, count) } else { getApplication<Application>().getString(R.string.snapshot_restore_failed) },