Fix Live Activity streak messaging and mislabeled widget text
Show "Start your streak!" instead of "Don't break your streak!" when streak count is zero, and fix small widget incorrectly labeling total entries as "day streak". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,7 @@ struct MoodStreakLiveActivity: Widget {
|
||||
}
|
||||
|
||||
DynamicIslandExpandedRegion(.center) {
|
||||
Text(context.state.hasLoggedToday ? "Streak: \(context.state.currentStreak) days" : "Don't break your streak!")
|
||||
Text(context.state.hasLoggedToday ? "Streak: \(context.state.currentStreak) days" : (context.state.currentStreak > 0 ? "Don't break your streak!" : "Start your streak!"))
|
||||
.font(.headline)
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ struct MoodStreakLockScreenView: View {
|
||||
}
|
||||
} else {
|
||||
VStack(alignment: .leading) {
|
||||
Text("Don't break your streak!")
|
||||
Text(context.state.currentStreak > 0 ? "Don't break your streak!" : "Start your streak!")
|
||||
.font(.headline)
|
||||
Text("Tap to log your mood")
|
||||
.font(.caption)
|
||||
|
||||
@@ -110,7 +110,7 @@ struct VotedStatsView: View {
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
if let stats = entry.stats {
|
||||
Text("\(stats.totalEntries) day streak")
|
||||
Text("\(stats.totalEntries) entries")
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.tertiary)
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ private struct ExportVotedStatsView: View {
|
||||
.font(.caption.weight(.semibold))
|
||||
.foregroundStyle(.secondary)
|
||||
|
||||
Text("\(totalEntries) day streak")
|
||||
Text("\(totalEntries) entries")
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.tertiary)
|
||||
}
|
||||
@@ -762,7 +762,7 @@ private struct ExportLiveActivityView: View {
|
||||
}
|
||||
} else {
|
||||
VStack(alignment: .leading) {
|
||||
Text("Don't break your streak!")
|
||||
Text(streak > 0 ? "Don't break your streak!" : "Start your streak!")
|
||||
.font(.headline)
|
||||
Text("Tap to log your mood")
|
||||
.font(.caption)
|
||||
|
||||
Reference in New Issue
Block a user