From 26702a0e7590cc64b4707d304bd0ff97f1e59f62 Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 15 Feb 2023 11:11:33 +0100 Subject: [PATCH] Adds toothbrushing --- LeCountdown/Views/PresetsView.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/LeCountdown/Views/PresetsView.swift b/LeCountdown/Views/PresetsView.swift index d4b0b6c..0b571a8 100644 --- a/LeCountdown/Views/PresetsView.swift +++ b/LeCountdown/Views/PresetsView.swift @@ -13,12 +13,14 @@ enum PresetSection: Int, Identifiable, CaseIterable { case workout case chill case cooking + case other var presets: [Preset] { switch self { case .cooking: return [.softBoiled, .mediumBoiledEggs, .hardBoiledEggs] case .workout: return [.runningSplits] case .chill: return [.nap, .meditation] + case .other: return [.toothbrushing] } } @@ -27,11 +29,11 @@ enum PresetSection: Int, Identifiable, CaseIterable { case .cooking: return NSLocalizedString("Cooking", comment: "") case .workout: return NSLocalizedString("Workout", comment: "") case .chill: return NSLocalizedString("Chill", comment: "") + case .other: return NSLocalizedString("Other", comment: "") } } } - struct CountdownIntervalGroup { var repeatCount: Int var intervals: [CountdownInterval] @@ -51,6 +53,7 @@ enum Preset: Int, Identifiable, CaseIterable { case meditation case nap case runningSplits + case toothbrushing var localizedName: String { switch self { @@ -60,6 +63,7 @@ enum Preset: Int, Identifiable, CaseIterable { case .meditation: return NSLocalizedString("Meditation", comment: "") case .nap: return NSLocalizedString("Nap", comment: "") case .runningSplits: return NSLocalizedString("Running splits", comment: "") + case .toothbrushing: return NSLocalizedString("Toothbrushing", comment: "") } } @@ -81,7 +85,8 @@ enum Preset: Int, Identifiable, CaseIterable { case .hardBoiledEggs: return 10 * 60 case .meditation: return 15 * 60 case .nap: return 20 * 60 - case .runningSplits: return 13 + case .runningSplits: return 0.0 + case .toothbrushing: return 2 * 60.0 } } @@ -109,6 +114,7 @@ enum Preset: Int, Identifiable, CaseIterable { case .meditation: return [] case .nap: return [] case .runningSplits: return [] + case .toothbrushing: return [] } }