Add discipline mode#5
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9af7820bd6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| public var totalSeconds: TimeInterval { | ||
| TimeInterval(max(0, days) * 24 * 60 * 60 + max(0, hours) * 60 * 60 + max(0, minutes) * 60) |
There was a problem hiding this comment.
Split totalSeconds arithmetic so the package compiles
With Swift 6.2.4, the new package fails during swift test at this expression because the type checker cannot solve the chained max/multiplication expression, so neither the DisciplineModeCore tests nor any build that compiles this file can complete. Break the day/hour/minute totals into typed intermediate values before converting to TimeInterval.
Useful? React with 👍 / 👎.
| Button { | ||
| isPresented.wrappedValue = true | ||
| } label: { | ||
| Label("预告", systemImage: "calendar") | ||
| Label("自律模式", systemImage: "calendar.badge.lock") |
There was a problem hiding this comment.
Preserve the preview month toolbar entry
On the mobile home screen, replacing the existing NavigationLink to PreviewMonthScreen() with this button removes the only repo reference that presents the preview month table (rg "PreviewMonthScreen" Hana now only finds the screen's definition), so iOS/visionOS users can no longer reach that feature. Keep the existing preview action or add another entry point when adding discipline mode.
Useful? React with 👍 / 👎.
9af7820 to
2702eb4
Compare
2702eb4 to
f85bdd8
Compare
Summary