Skip to content

Commit

Permalink
change key parameter -> dbKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Metaroll committed Dec 10, 2024
1 parent 003a93c commit 6112475
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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) }

Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 6112475

Please sign in to comment.