     @ObservedObject var countdown = CountdownTimer.shared
     @ObservedObject var appearance = Appearance.shared
     
-    @State private var lengthInMinutes = CountdownTimer.shared.length / 60
+    @State private var countdownMinutes = CountdownTimer.shared.length / 60
+    @State private var countdownSeconds = CountdownTimer.shared.length.truncatingRemainder(dividingBy: 60)
     @State private var isPresentingAppearance = false
     var hasDisplayConnected = false
     

                .padding(.horizontal)
            
            HStack {
                Text("Length")
                TextField("Length", value: $lengthInMinutes, formatter: NumberFormatter())
                    .keyboardType(.numbersAndPunctuation)
                    .textFieldStyle(RoundedBorderTextFieldStyle())
                    .frame(width: 75)
                    .onChange(of: lengthInMinutes) { value in
                        countdown.length = lengthInMinutes.rounded() * 60
                    }
                #warning("Add a length in seconds field")
            }
            
            Spacer()

        }
    }
    
    func updateLength() {
        countdown.length = (countdownMinutes.rounded() * 60) + countdownSeconds.rounded()
        
        if countdownSeconds > 59 {
            countdownMinutes = CountdownTimer.shared.length / 60
            countdownSeconds = CountdownTimer.shared.length.truncatingRemainder(dividingBy: 60)
        }
    }
    
    func plusOne() {
        #warning("Re-enable the reset button if not yet started")
        countdown.add(60)
