From 93775e1f3d79a1e11b839abbf24201dafcd9e646 Mon Sep 17 00:00:00 2001 From: tj <1378534974@qq.com> Date: 星期五, 25 四月 2025 13:45:56 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- app/src/main/java/com/example/firstapp/activity/ReminderSettingsActivity.kt | 31 ++++++++++++++++--------------- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/com/example/firstapp/activity/ReminderSettingsActivity.kt b/app/src/main/java/com/example/firstapp/activity/ReminderSettingsActivity.kt index 73b0913..4f70289 100644 --- a/app/src/main/java/com/example/firstapp/activity/ReminderSettingsActivity.kt +++ b/app/src/main/java/com/example/firstapp/activity/ReminderSettingsActivity.kt @@ -33,14 +33,15 @@ private fun setupCheckBoxes() { // 全选分类按钮逻辑 binding.tvSelectAll.setOnClickListener { - val shouldCheck = !(binding.checkBoxExpress.isChecked && binding.checkBoxFinance.isChecked && - binding.checkBoxIncome.isChecked && binding.checkBoxFlight.isChecked && binding.checkBoxTrain.isChecked) - + val shouldCheck = !(binding.checkBoxExpress.isChecked && binding.checkBoxFinance.isChecked && binding.checkBoxIncome.isChecked ) +// binding.checkBoxFlight.isChecked && binding.checkBoxTrain.isChecked) + + binding.checkBoxExpress.isChecked = shouldCheck binding.checkBoxFinance.isChecked = shouldCheck binding.checkBoxIncome.isChecked = shouldCheck - binding.checkBoxFlight.isChecked = shouldCheck - binding.checkBoxTrain.isChecked = shouldCheck +// binding.checkBoxFlight.isChecked = shouldCheck +// binding.checkBoxTrain.isChecked = shouldCheck } // 全选提醒方式按钮逻辑 @@ -74,16 +75,16 @@ private fun disableVipCategories() { binding.apply { checkBoxIncome.isEnabled = false - checkBoxFlight.isEnabled = false - checkBoxTrain.isEnabled = false +// checkBoxFlight.isEnabled = false +// checkBoxTrain.isEnabled = false } } private fun enableAllCategories() { binding.apply { checkBoxIncome.isEnabled = true - checkBoxFlight.isEnabled = true - checkBoxTrain.isEnabled = true +// checkBoxFlight.isEnabled = true +// checkBoxTrain.isEnabled = true } } @@ -94,8 +95,8 @@ checkBoxExpress.isChecked = reminders.any { it.categoryName == "快递" } checkBoxFinance.isChecked = reminders.any { it.categoryName == "还款" } checkBoxIncome.isChecked = reminders.any { it.categoryName == "收入" } - checkBoxFlight.isChecked = reminders.any { it.categoryName == "航班" } - checkBoxTrain.isChecked = reminders.any { it.categoryName == "火车票" } +// checkBoxFlight.isChecked = reminders.any { it.categoryName == "航班" } +// checkBoxTrain.isChecked = reminders.any { it.categoryName == "火车票" } // 检查是否有通知方法设置 checkBoxPhone.isChecked = reminders.any { it.notificationMethod == "PHONE" } @@ -117,8 +118,8 @@ binding.checkBoxExpress.setOnCheckedChangeListener { _, _ -> } binding.checkBoxFinance.setOnCheckedChangeListener { _, _ -> } binding.checkBoxIncome.setOnCheckedChangeListener { _, _ -> } - binding.checkBoxFlight.setOnCheckedChangeListener { _, _ -> } - binding.checkBoxTrain.setOnCheckedChangeListener { _, _ -> } +// binding.checkBoxFlight.setOnCheckedChangeListener { _, _ -> } +// binding.checkBoxTrain.setOnCheckedChangeListener { _, _ -> } } private fun saveSettings() { @@ -130,8 +131,8 @@ if (checkBoxExpress.isChecked) selectedCategories.add(CategoryConfig(1, "快递", 1, true)) if (checkBoxFinance.isChecked) selectedCategories.add(CategoryConfig(2, "还款", 2, true)) if (checkBoxIncome.isChecked) selectedCategories.add(CategoryConfig(3, "收入", 3, true)) - if (checkBoxFlight.isChecked) selectedCategories.add(CategoryConfig(4, "航班", 4, true)) - if (checkBoxTrain.isChecked) selectedCategories.add(CategoryConfig(5, "火车票", 5, true)) +// if (checkBoxFlight.isChecked) selectedCategories.add(CategoryConfig(4, "航班", 4, true)) +// if (checkBoxTrain.isChecked) selectedCategories.add(CategoryConfig(5, "火车票", 5, true)) } if (selectedCategories.isEmpty()) { -- Gitblit v1.9.3