polscm32 aka Marvout 1 год назад
Родитель
Сommit
9ce067f976
1 измененных файлов с 0 добавлено и 26 удалено
  1. 0 26
      FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

+ 0 - 26
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -350,32 +350,6 @@ extension Home {
             .padding(.bottom)
         }
 
-//        private func selectedProfile() -> (name: String, isOn: Bool) {
-//            var profileString = ""
-//            var display: Bool = false
-//
-//            let duration = (fetchedPercent.first?.duration ?? 0) as Decimal
-//            let indefinite = fetchedPercent.first?.indefinite ?? false
-//            let addedMinutes = Int(duration)
-//            let date = fetchedPercent.first?.date ?? Date()
-//            if date.addingTimeInterval(addedMinutes.minutes.timeInterval) > Date() || indefinite {
-//                display.toggle()
-//            }
-//
-//            if fetchedPercent.first?.enabled ?? false, !(fetchedPercent.first?.isPreset ?? false), display {
-//                profileString = NSLocalizedString("Custom Profile", comment: "Custom but unsaved Profile")
-//            } else if !(fetchedPercent.first?.enabled ?? false) || !display {
-//                profileString = NSLocalizedString("Normal Profile", comment: "Your normal Profile. Use a short string")
-//            } else {
-//                let id_ = fetchedPercent.first?.id ?? ""
-//                let profile = fetchedProfiles.filter({ $0.id == id_ }).first
-//                if profile != nil {
-//                    profileString = profile?.name?.description ?? ""
-//                }
-//            }
-//            return (name: profileString, isOn: display)
-//        }
-
         func highlightButtons() {
             for i in 0 ..< timeButtons.count {
                 timeButtons[i].active = timeButtons[i].hours == state.hours