From 61124751943caf5c65168dc3a91a1cc58b3134cb Mon Sep 17 00:00:00 2001 From: Metaroll Date: Tue, 10 Dec 2024 11:56:41 +0000 Subject: [PATCH] change key parameter -> dbKey --- .../java/com/mensinator/app/settings/SettingsScreen.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/mensinator/app/settings/SettingsScreen.kt b/app/src/main/java/com/mensinator/app/settings/SettingsScreen.kt index 2319e90..1f26bb1 100644 --- a/app/src/main/java/com/mensinator/app/settings/SettingsScreen.kt +++ b/app/src/main/java/com/mensinator/app/settings/SettingsScreen.kt @@ -132,7 +132,7 @@ fun SettingsScreen( ) SettingText( text = stringResource(R.string.period_notification_message), - key = "period_notification_message" + dbKey = "period_notification_message" ) Spacer(Modifier.height(16.dp)) @@ -455,10 +455,10 @@ private fun ColorPickerPreview() { private fun SettingText( text: String, modifier: Modifier = Modifier, - key: String, + dbKey: String, ) { val dbHelper: IPeriodDatabaseHelper = koinInject() - val message = dbHelper.getSettingByKey(key)?.value.toString() + val message = dbHelper.getSettingByKey(dbKey)?.value.toString() var showDialog by remember { mutableStateOf(false) } var newMessage by remember { mutableStateOf(message) } @@ -488,7 +488,7 @@ private fun SettingText( }, confirmButton = { Button(onClick = { - dbHelper.updateSetting(key = key, value = newMessage) + dbHelper.updateSetting(key = dbKey, value = newMessage) showDialog = false }) { Text(text = stringResource(id = R.string.save_button))