Add custom interval days support for task frequency

- Add customIntervalDays field to Kotlin models (TaskResponse, TaskCreateRequest, TaskUpdateRequest)
- Update Android AddTaskDialog to show interval field only for "Custom" frequency
- Update Android EditTaskScreen for custom frequency support
- Update iOS TaskFormView for custom frequency support
- Fix preview data in TaskCard and TasksSection to include new field
- Add customIntervalDays to OnboardingFirstTaskView

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-13 19:05:59 -06:00
parent 3140c75815
commit 33ee445aea
20 changed files with 524 additions and 238 deletions

View File

@@ -1,10 +1,10 @@
package com.casera.storage
package com.example.casera.storage
import java.io.File
import java.util.prefs.Preferences
/**
* JVM implementation of TaskCacheManager using Java Preferences.
* Note: JVM/Desktop doesn't have widgets, so dirty flag methods are no-ops.
*/
actual class TaskCacheManager {
private val prefs = Preferences.userRoot().node(NODE_NAME)
@@ -23,9 +23,33 @@ actual class TaskCacheManager {
prefs.flush()
}
/**
* Check if tasks need refresh. JVM doesn't have widgets, always returns false.
*/
actual fun areTasksDirty(): Boolean {
return prefs.getBoolean(KEY_DIRTY_FLAG, false)
}
/**
* Mark tasks as dirty. JVM doesn't have widgets but supports the interface.
*/
actual fun markTasksDirty() {
prefs.putBoolean(KEY_DIRTY_FLAG, true)
prefs.flush()
}
/**
* Clear the dirty flag.
*/
actual fun clearDirtyFlag() {
prefs.putBoolean(KEY_DIRTY_FLAG, false)
prefs.flush()
}
companion object {
private const val NODE_NAME = "com.casera.cache"
private const val KEY_TASKS = "cached_tasks"
private const val KEY_DIRTY_FLAG = "tasks_dirty"
@Volatile
private var instance: TaskCacheManager? = null