diff --git a/views/src/main/java/ru/touchin/widget/AmountWithDecimalDecorator.kt b/views/src/main/java/ru/touchin/widget/AmountWithDecimalDecorator.kt index dc2f644..bd95453 100644 --- a/views/src/main/java/ru/touchin/widget/AmountWithDecimalDecorator.kt +++ b/views/src/main/java/ru/touchin/widget/AmountWithDecimalDecorator.kt @@ -44,16 +44,14 @@ class AmountWithDecimalDecorator( fun getTextWithoutFormatting(decimalSeparatorToReplace: String = decimalSeparator): String = textBefore.withoutFormatting(decimalSeparatorToReplace) - @Suppress("detekt.TooGenericExceptionCaught", "detekt.LongMethod") + @Suppress("detekt.TooGenericExceptionCaught") private fun doOnTextChanged(text: String) { if (isTextWasArtificiallyChanged) { isTextWasArtificiallyChanged = false val cursorPosition = editText.selectionStart try { var currentText = text - possibleDecimalSeparators.forEach { - currentText = currentText.replace(it, decimalSeparator) - } + possibleDecimalSeparators.forEach { currentText = currentText.replace(it, decimalSeparator) } if (isTextFormatIncorrect(currentText)) { setTextWhenNewInputIncorrect(currentText, cursorPosition)