diff --git a/app/src/main/kotlin/cn/super12138/todo/constants/Constants.kt b/app/src/main/kotlin/cn/super12138/todo/constants/Constants.kt index 1b7d8ee..4a7547e 100644 --- a/app/src/main/kotlin/cn/super12138/todo/constants/Constants.kt +++ b/app/src/main/kotlin/cn/super12138/todo/constants/Constants.kt @@ -24,8 +24,8 @@ object Constants { const val PREF_CONTRAST_LEVEL = "contrast_level" const val PREF_CONTRAST_LEVEL_DEFAULT = 0f // Normal - const val PREF_SHOW_COMPLETED = "show_completed" - const val PREF_SHOW_COMPLETED_DEFAULT = true + /*const val PREF_SHOW_COMPLETED = "show_completed" + const val PREF_SHOW_COMPLETED_DEFAULT = true*/ const val PREF_SORTING_METHOD = "sorting_method" const val PREF_SORTING_METHOD_DEFAULT = 1 diff --git a/app/src/main/kotlin/cn/super12138/todo/logic/datastore/DataStoreManager.kt b/app/src/main/kotlin/cn/super12138/todo/logic/datastore/DataStoreManager.kt index 093a097..e8d8de1 100644 --- a/app/src/main/kotlin/cn/super12138/todo/logic/datastore/DataStoreManager.kt +++ b/app/src/main/kotlin/cn/super12138/todo/logic/datastore/DataStoreManager.kt @@ -37,7 +37,7 @@ object DataStoreManager { private val CONTRAST_LEVEL = floatPreferencesKey(Constants.PREF_CONTRAST_LEVEL) // 界面与交互 - private val SHOW_COMPLETED = booleanPreferencesKey(Constants.PREF_SHOW_COMPLETED) + // private val SHOW_COMPLETED = booleanPreferencesKey(Constants.PREF_SHOW_COMPLETED) private val SORTING_METHOD = intPreferencesKey(Constants.PREF_SORTING_METHOD) private val SECURE_MODE = booleanPreferencesKey(Constants.PREF_SECURE_MODE) private val HAPTIC_FEEDBACK = booleanPreferencesKey(Constants.PREF_HAPTIC_FEEDBACK) @@ -62,9 +62,9 @@ object DataStoreManager { preferences[CONTRAST_LEVEL] ?: Constants.PREF_CONTRAST_LEVEL_DEFAULT } - val showCompletedFlow: Flow = dataStore.data.map { preferences -> + /*val showCompletedFlow: Flow = dataStore.data.map { preferences -> preferences[SHOW_COMPLETED] ?: Constants.PREF_SHOW_COMPLETED_DEFAULT - } + }*/ val sortingMethodFlow: Flow = dataStore.data.map { preferences -> preferences[SORTING_METHOD] ?: Constants.PREF_SORTING_METHOD_DEFAULT @@ -107,11 +107,11 @@ object DataStoreManager { } } - suspend fun setShowCompleted(value: Boolean) { + /*suspend fun setShowCompleted(value: Boolean) { dataStore.edit { preferences -> preferences[SHOW_COMPLETED] = value } - } + }*/ suspend fun setSortingMethod(value: Int) { dataStore.edit { preferences -> diff --git a/app/src/main/kotlin/cn/super12138/todo/ui/pages/settings/SettingsInterfaceInteraction.kt b/app/src/main/kotlin/cn/super12138/todo/ui/pages/settings/SettingsInterfaceInteraction.kt index f7ab29c..f86c66d 100644 --- a/app/src/main/kotlin/cn/super12138/todo/ui/pages/settings/SettingsInterfaceInteraction.kt +++ b/app/src/main/kotlin/cn/super12138/todo/ui/pages/settings/SettingsInterfaceInteraction.kt @@ -32,7 +32,7 @@ fun SettingsInterface( onNavigateUp: () -> Unit, modifier: Modifier = Modifier ) { - val showCompleted by DataStoreManager.showCompletedFlow.collectAsState(initial = Constants.PREF_SHOW_COMPLETED_DEFAULT) + // val showCompleted by DataStoreManager.showCompletedFlow.collectAsState(initial = Constants.PREF_SHOW_COMPLETED_DEFAULT) val secureMode by DataStoreManager.secureModeFlow.collectAsState(initial = Constants.PREF_SECURE_MODE_DEFAULT) val sortingMethod by DataStoreManager.sortingMethodFlow.collectAsState(initial = Constants.PREF_SORTING_METHOD_DEFAULT) val hapticFeedback by DataStoreManager.hapticFeedbackFlow.collectAsState(initial = Constants.PREF_HAPTIC_FEEDBACK_DEFAULT) @@ -50,15 +50,13 @@ fun SettingsInterface( title = stringResource(R.string.pref_category_todo_list), first = true ) - SwitchSettingsItem( + /*SwitchSettingsItem( leadingIconRes = R.drawable.ic_checklist, title = stringResource(R.string.pref_show_completed), description = stringResource(R.string.pref_show_completed_desc), checked = showCompleted, onCheckedChange = { scope.launch { DataStoreManager.setShowCompleted(it) } } - ) - } - item { + )*/ SettingsItem( leadingIconRes = R.drawable.ic_sort, title = stringResource(R.string.pref_sorting_method), diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index a8d1145..99cc6fc 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -66,8 +66,8 @@ مرتفع جدًا الواجهة والتفاعل قائمة المهام، الاهتزاز - إظهار المهام المكتملة - عرض المهام المكتملة في قائمة المهام + قائمة المهام عرض على GitHub عرض الكود المصدري، الإبلاغ عن الأخطاء، واقتراح التحسينات diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index a4042e8..973cf30 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -65,8 +65,8 @@ 极高 界面与交互 待办列表、触感反馈 - 显示已完成待办 - 在待办列表里显示已完成的待办 + 待办列表 在 GitHub 上查看 查看源代码、提交错误报告和改进建议 @@ -118,7 +118,7 @@ 概览 尽量使用简短的分类名称 清除 - 临近的任务 + 临近任务 今天 明天 %d 天后 @@ -134,4 +134,5 @@ 截止日期 暂未搜索到内容 暂无任务 + 今日任务 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eaa5875..4ff12bf 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -66,8 +66,8 @@ Very High Interface & Interaction To-Do List, Haptic Feedback - Show Completed Tasks - Show completed tasks in to-do list + To-Do List View On GitHub View source code, submit bug reports, and improvement suggestions @@ -135,4 +135,5 @@ Due date No tasks found No tasks + Today \ No newline at end of file