release
Laurent 3 years ago
parent 4b9d8a1092
commit 0fcd80153d
  1. 3
      LeCountdown/Views/NewCountdownView.swift

@ -188,7 +188,8 @@ struct CountdownEditView : View {
cd.duration = self._minutes * 60.0 + self._seconds cd.duration = self._minutes * 60.0 + self._seconds
if self._isAdding { if self._isAdding {
cd.order = Int16(self.countdowns.count) let max = self.countdowns.map { $0.order }.max() ?? 0
cd.order = max + 1
} }
if !self.nameString.isEmpty { if !self.nameString.isEmpty {
cd.activity = CoreDataRequests.getOrCreateActivity(name: self.nameString) cd.activity = CoreDataRequests.getOrCreateActivity(name: self.nameString)

Loading…
Cancel
Save