Skip to content

Commit 048b261

Browse files
Refactor settings UI: replace AccountCenterCard with SettingsItem in household-related components, improve layout and styling, and update Detekt configuration
1 parent 7e50114 commit 048b261

38 files changed

+1894
-1524
lines changed

app/build.gradle.kts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ android {
8686
}
8787
}
8888

89+
configurations.all {
90+
resolutionStrategy {
91+
force("io.ktor:ktor-client-core:2.3.12")
92+
force("io.ktor:ktor-client-okhttp:2.3.12")
93+
force("io.ktor:ktor-serialization-kotlinx-json:2.3.12")
94+
force("io.ktor:ktor-client-content-negotiation:2.3.12")
95+
}
96+
}
97+
8998
detekt {
9099
config.setFrom(files("$projectDir/detekt.yml"))
91100
buildUponDefaultConfig = true
@@ -105,8 +114,8 @@ dependencies {
105114
androidTestImplementation(libs.androidx.junit)
106115
androidTestImplementation(platform(libs.androidx.compose.bom))
107116
detektPlugins(libs.detekt)
108-
detektPlugins("io.nlopez.compose.rules:detekt:0.4.12")
109-
ktlintRuleset("io.nlopez.compose.rules:ktlint:0.4.28")
117+
detektPlugins(libs.rules.detekt)
118+
ktlintRuleset(libs.ktlint)
110119
implementation(libs.integrity)
111120
implementation(libs.android.image.cropper)
112121
implementation(libs.accompanist.flowlayout)
@@ -165,7 +174,10 @@ dependencies {
165174
implementation(libs.generativeai)
166175
implementation(libs.kotlinx.coroutines.core)
167176
implementation(libs.kotlinx.coroutines.android)
177+
implementation(libs.ktor.client.core)
168178
implementation(libs.ktor.client.okhttp)
179+
implementation(libs.ktor.client.content.negotiation)
180+
implementation(libs.ktor.serialization.kotlinx.json)
169181
implementation(libs.gms.google.services)
170182
implementation(libs.gms.play.services.mlkit.image.labeling)
171183
implementation(libs.googleid)

app/detekt.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
exceptions:
2+
TooGenericExceptionCaught:
3+
active: false
4+
TooGenericExceptionThrown:
5+
active: false
6+
17
style:
28
MagicNumber:
39
active: false
10+
MaxLineLength:
11+
active: true
12+
maxLineLength: 140
13+
ExplicitItLambdaParameter:
14+
active: false
15+
416
naming:
517
FunctionNaming:
618
active: true
@@ -38,5 +50,4 @@ Compose:
3850
ViewModelForwarding:
3951
active: true
4052
ViewModelInjection:
41-
active: true
42-
53+
active: true

app/src/main/java/com/freshkeeper/MainActivity.kt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,17 @@ class MainActivity : FragmentActivity() {
4242
private lateinit var updateManager: UpdateManager
4343
private val currentUserId = Firebase.auth.currentUser?.uid
4444

45-
@Inject lateinit var consentManager: ConsentManager
45+
@Inject
46+
lateinit var consentManager: ConsentManager
4647

47-
@Inject lateinit var firebaseServiceController: FirebaseServiceController
48+
@Inject
49+
lateinit var firebaseServiceController: FirebaseServiceController
4850

49-
@Inject lateinit var firestore: FirebaseFirestore
51+
@Inject
52+
lateinit var firestore: FirebaseFirestore
5053

51-
@Inject lateinit var themeService: ThemeService
54+
@Inject
55+
lateinit var themeService: ThemeService
5256

5357
override fun onCreate(savedInstanceState: Bundle?) {
5458
enableEdgeToEdge()
@@ -121,7 +125,7 @@ class MainActivity : FragmentActivity() {
121125
Toast
122126
.makeText(
123127
this,
124-
"Please connect to the internet",
128+
getString(R.string.please_connect_to_internet),
125129
Toast.LENGTH_LONG,
126130
).show()
127131
}

0 commit comments

Comments
 (0)