Procházet zdrojové kódy

add orig comment back

kskandis před 1 rokem
rodič
revize
723163fa22
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      FreeAPS/Sources/Views/TextFieldWithToolBar.swift

+ 1 - 0
FreeAPS/Sources/Views/TextFieldWithToolBar.swift

@@ -158,6 +158,7 @@ extension TextFieldWithToolBar.Coordinator: UITextFieldDelegate {
             // Remove thousand separator
             // Remove thousand separator
             let proposedText = proposedTextOriginal.replacingOccurrences(of: decimalFormatter.groupingSeparator, with: "")
             let proposedText = proposedTextOriginal.replacingOccurrences(of: decimalFormatter.groupingSeparator, with: "")
 
 
+            // Try to convert proposed text to number
             let number = parent.numberFormatter.number(from: proposedText) ?? decimalFormatter.number(from: proposedText)
             let number = parent.numberFormatter.number(from: proposedText) ?? decimalFormatter.number(from: proposedText)
 
 
             // Update the binding value if conversion is successful
             // Update the binding value if conversion is successful