From 9dde21ab801f299f16dbf7f43011d1fe0966ff26 Mon Sep 17 00:00:00 2001 From: dodo Date: Wed, 28 Jan 2026 15:02:26 +0900 Subject: [PATCH 01/11] =?UTF-8?q?[Fix/#141]=20=EA=B0=80=EA=B2=A9=200=20?= =?UTF-8?q?=EC=9D=B4=ED=9B=84=20=EC=9E=85=EB=A0=A5=20=EC=A0=9C=ED=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../party/create/component/EditOptionPrice.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index 8a356b2d..1e6fd81b 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -110,7 +110,14 @@ fun EditOptionPrice( if (!newValue.isDigitsOnly()) return@OptionTextField if (newValue.length > MAX_LENGTH) return@OptionTextField - onValueChanged(newValue) + val adjusted = when { + newValue.isEmpty() -> "" + newValue.all { c -> c == '0' } -> "0" + newValue.startsWith("0") -> newValue.dropWhile { it == '0' } + else -> newValue + } + + onValueChanged(adjusted) }, imeAction = imeAction, transformation = transformation, From dc54e1252a67d5496f25e82cee124e86b4ca5618 Mon Sep 17 00:00:00 2001 From: dodo Date: Wed, 28 Jan 2026 15:04:27 +0900 Subject: [PATCH 02/11] =?UTF-8?q?[Chore/#141]=20=EC=A1=B0=EA=B1=B4?= =?UTF-8?q?=EC=8B=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/party/create/component/EditOptionPrice.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index 1e6fd81b..29ad66fd 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -112,7 +112,7 @@ fun EditOptionPrice( val adjusted = when { newValue.isEmpty() -> "" - newValue.all { c -> c == '0' } -> "0" + newValue.all { it == '0' } -> "0" newValue.startsWith("0") -> newValue.dropWhile { it == '0' } else -> newValue } From a957c540ae9cc1a79617700ea7e4b641770beaf8 Mon Sep 17 00:00:00 2001 From: dodo Date: Fri, 6 Feb 2026 11:11:25 +0900 Subject: [PATCH 03/11] =?UTF-8?q?[Refactor/#142]=20adjusted=20=EB=8B=A8?= =?UTF-8?q?=EC=88=9C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/party/create/component/EditOptionPrice.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index 29ad66fd..1a8b38fe 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -110,12 +110,7 @@ fun EditOptionPrice( if (!newValue.isDigitsOnly()) return@OptionTextField if (newValue.length > MAX_LENGTH) return@OptionTextField - val adjusted = when { - newValue.isEmpty() -> "" - newValue.all { it == '0' } -> "0" - newValue.startsWith("0") -> newValue.dropWhile { it == '0' } - else -> newValue - } + val adjusted = newValue.toIntOrNull()?.toString() ?: "" onValueChanged(adjusted) }, From 2f4b98149b70cedc6f92907139f9c78f101b74dc Mon Sep 17 00:00:00 2001 From: dodo Date: Fri, 6 Feb 2026 12:06:50 +0900 Subject: [PATCH 04/11] =?UTF-8?q?[Refactor/#142]=20draw=EB=A1=9C=20?= =?UTF-8?q?=EC=96=B8=EB=8D=94=EB=9D=BC=EC=9D=B8=20=EB=8C=80=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../party/create/component/EditOptionPrice.kt | 74 ++++++++++--------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index 1a8b38fe..3ce895fb 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -8,23 +8,21 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width -import androidx.compose.foundation.layout.widthIn -import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.text.BasicTextField import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.drawWithCache import androidx.compose.ui.focus.FocusDirection import androidx.compose.ui.focus.onFocusChanged +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.graphics.StrokeCap import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalSoftwareKeyboardController @@ -45,6 +43,7 @@ import com.poti.android.R import com.poti.android.core.common.extension.toMoneyString import com.poti.android.core.designsystem.component.display.PotiCheckBox import com.poti.android.core.designsystem.theme.PotiTheme +import kotlin.math.max private const val MAX_LENGTH = 9 @@ -100,37 +99,23 @@ fun EditOptionPrice( Spacer(Modifier.width(12.dp)) - Column( - verticalArrangement = Arrangement.spacedBy(4.dp), - horizontalAlignment = Alignment.End, - ) { - OptionTextField( - value = value, - onValueChanged = { newValue -> - if (!newValue.isDigitsOnly()) return@OptionTextField - if (newValue.length > MAX_LENGTH) return@OptionTextField - - val adjusted = newValue.toIntOrNull()?.toString() ?: "" - - onValueChanged(adjusted) - }, - imeAction = imeAction, - transformation = transformation, - textStyle = textStyle, - onFocusChanged = onFocusChanged, - enabled = enabled, - modifier = Modifier.width(textWidth), - ) + OptionTextField( + value = value, + onValueChanged = { newValue -> + if (!newValue.isDigitsOnly()) return@OptionTextField + if (newValue.length > MAX_LENGTH) return@OptionTextField - HorizontalDivider( - modifier = Modifier - .widthIn(min = 42.dp) - .width(textWidth) - .clip(CircleShape), - thickness = 2.dp, - color = PotiTheme.colors.gray300, - ) - } + val adjusted = newValue.toIntOrNull()?.toString() ?: "" + + onValueChanged(adjusted) + }, + imeAction = imeAction, + transformation = transformation, + textStyle = textStyle, + onFocusChanged = onFocusChanged, + enabled = enabled, + modifier = Modifier.width(textWidth), + ) Spacer(Modifier.width(4.dp)) @@ -155,6 +140,7 @@ private fun OptionTextField( ) { val focusManager = LocalFocusManager.current val keyboardController = LocalSoftwareKeyboardController.current + val colors = PotiTheme.colors BasicTextField( value = value, @@ -162,6 +148,24 @@ private fun OptionTextField( modifier = modifier .onFocusChanged { focusState -> onFocusChanged(focusState.isFocused) + } + .drawWithCache { + val minWidth = 42.dp.toPx() + val strokeWidth = 2.dp.toPx() + val yOffset = strokeWidth / 2 - 4.dp.toPx() + + onDrawBehind { + val underlineWidth = max(size.width, minWidth) + val y = size.height - yOffset + + drawLine( + color = colors.gray300, + start = Offset(size.width - underlineWidth, y), + end = Offset(size.width, y), + strokeWidth = strokeWidth, + cap = StrokeCap.Round, + ) + } }, textStyle = textStyle.copy( color = PotiTheme.colors.black, From 4914def28aba34b967a23599c834d645ad09a801 Mon Sep 17 00:00:00 2001 From: dodo Date: Sat, 7 Feb 2026 13:46:40 +0900 Subject: [PATCH 05/11] =?UTF-8?q?[Refactor/#141]=20textWidth=20draw?= =?UTF-8?q?=EC=97=90=EB=A7=8C=20=EC=82=AC=EC=9A=A9=EB=90=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20-=20as-is=20:=20OptionTextField=EC=97=90=20modifier?= =?UTF-8?q?=20width=EB=A1=9C=20textWidth=20=EC=A0=84=EB=8B=AC=20-=20to-be?= =?UTF-8?q?=20:=20OptionTextField=20=ED=8F=AD=EC=A0=9C=ED=95=9C=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0,=20TextAlign.End=20=EC=A0=81=EC=9A=A9,=20tex?= =?UTF-8?q?tWidth=EB=8A=94=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=EB=A1=9C?= =?UTF-8?q?=20=EC=A0=84=EB=8B=AC=ED=95=B4=20underline=20=EA=B7=B8=EB=A6=AC?= =?UTF-8?q?=EB=8A=94=20=EB=8D=B0=EB=A7=8C=20=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../party/create/component/EditOptionPrice.kt | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index 3ce895fb..fb5d3ecd 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -35,8 +35,10 @@ import androidx.compose.ui.text.input.OffsetMapping import androidx.compose.ui.text.input.TransformedText import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.text.rememberTextMeasurer +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.core.text.isDigitsOnly import com.poti.android.R @@ -71,7 +73,7 @@ fun EditOptionPrice( val textWidth = remember(transformedText, textStyle) { density.run { - measurer.measure(transformedText, textStyle).size.width.toDp() + 2.dp + measurer.measure(transformedText, textStyle).size.width.toDp() } } @@ -114,7 +116,7 @@ fun EditOptionPrice( textStyle = textStyle, onFocusChanged = onFocusChanged, enabled = enabled, - modifier = Modifier.width(textWidth), + textWidth = textWidth, ) Spacer(Modifier.width(4.dp)) @@ -136,6 +138,7 @@ private fun OptionTextField( textStyle: TextStyle, onFocusChanged: (Boolean) -> Unit, enabled: Boolean, + textWidth: Dp, modifier: Modifier = Modifier, ) { val focusManager = LocalFocusManager.current @@ -150,25 +153,28 @@ private fun OptionTextField( onFocusChanged(focusState.isFocused) } .drawWithCache { - val minWidth = 42.dp.toPx() - val strokeWidth = 2.dp.toPx() - val yOffset = strokeWidth / 2 - 4.dp.toPx() + val minPx = 42.dp.toPx() + val textPx = textWidth.toPx() + val underlinePx = max(minPx, textPx) + + val strokePx = 2.dp.toPx() + val yOffset = strokePx / 2 - 4.dp.toPx() onDrawBehind { - val underlineWidth = max(size.width, minWidth) val y = size.height - yOffset drawLine( color = colors.gray300, - start = Offset(size.width - underlineWidth, y), + start = Offset(size.width - underlinePx, y), end = Offset(size.width, y), - strokeWidth = strokeWidth, + strokeWidth = strokePx, cap = StrokeCap.Round, ) } }, textStyle = textStyle.copy( color = PotiTheme.colors.black, + textAlign = TextAlign.End, ), keyboardOptions = KeyboardOptions( keyboardType = KeyboardType.Number, @@ -242,7 +248,7 @@ private class PriceVisualTransformation : VisualTransformation { } } -@Preview +@Preview(showBackground = true) @Composable private fun OptionTextFieldPreview() { var text1 by remember { mutableStateOf("") } From d71b5d66e09cc97def50624a809f7537d40742cb Mon Sep 17 00:00:00 2001 From: dodo Date: Sat, 7 Feb 2026 14:49:45 +0900 Subject: [PATCH 06/11] =?UTF-8?q?[Refactor/#141]=20PriceVisualTransformati?= =?UTF-8?q?on=20=EB=B3=80=EC=88=98=EB=AA=85=20=EB=B0=8F=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=95=20-=20originalText/transformedTe?= =?UTF-8?q?xt=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EC=88=98=EB=AA=85=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20-=20=EC=96=BC=EB=A6=AC=20=EB=A6=AC=ED=84=B4=20?= =?UTF-8?q?=EC=A1=B0=EA=B1=B4=EC=8B=9D=20=EB=B0=A9=EC=96=B4=EC=A0=81?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=9E=91=EC=84=B1=20-=20transformedToOrig?= =?UTF-8?q?inal=20=EA=B3=84=EC=82=B0=EC=8B=9D=20=EB=8B=A8=EC=88=9C?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../party/create/component/EditOptionPrice.kt | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index fb5d3ecd..11ead051 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -202,20 +202,15 @@ private fun OptionTextField( private class PriceVisualTransformation : VisualTransformation { override fun filter(text: AnnotatedString): TransformedText { - val text = text.text + val originalText = text.text - val textWithComma = when (text.length) { - 0 -> text - else -> text.toInt().toMoneyString() - } + val transformedText = originalText.toIntOrNull()?.toMoneyString() ?: originalText val offsetMapping = object : OffsetMapping { override fun originalToTransformed(offset: Int): Int { - if (offset == text.length) { - return textWithComma.length - } + if (offset >= originalText.length) return transformedText.length - val numbersAtferCursor = text.length - offset + val numbersAtferCursor = originalText.length - offset val commasAfterCursor = if (numbersAtferCursor % 3 == 0) { numbersAtferCursor / 3 - 1 @@ -223,26 +218,24 @@ private class PriceVisualTransformation : VisualTransformation { numbersAtferCursor / 3 } - return textWithComma.length - numbersAtferCursor - commasAfterCursor + return transformedText.length - numbersAtferCursor - commasAfterCursor } override fun transformedToOriginal(offset: Int): Int { - var commasBeforeCursor = 0 + if (offset >= transformedText.length) return originalText.length - textWithComma.forEachIndexed { index, char -> - if (index >= offset) return@forEachIndexed - - if (char == ',') { - commasBeforeCursor += 1 - } - } + // 목표 = 커서 좌측 원본 길이 + // = 원본 전체 길이 - 원본 우측 길이 + // = 원본 전체 길이 - (변경 우측 길이 - 변형 우측 콤마 개수) + val rightOffset = transformedText.length - offset + val rightCommas = rightOffset / 4 - return offset - commasBeforeCursor + return originalText.length - (rightOffset - rightCommas) } } return TransformedText( - text = AnnotatedString(textWithComma), + text = AnnotatedString(transformedText), offsetMapping = offsetMapping, ) } From a1302d4c84085fcf6717a7ff9dfa379b6860c75f Mon Sep 17 00:00:00 2001 From: dodo Date: Sat, 7 Feb 2026 15:01:06 +0900 Subject: [PATCH 07/11] =?UTF-8?q?[Refactor/#141]=20textWidth=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20-=20=ED=85=8D=EC=8A=A4=ED=8A=B8=ED=95=84=EB=93=9C?= =?UTF-8?q?=EC=97=90=20widthIn=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../party/create/component/EditOptionPrice.kt | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index 11ead051..10a83f63 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -2,12 +2,14 @@ package com.poti.android.presentation.party.create.component import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.IntrinsicSize import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.text.BasicTextField import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions @@ -23,7 +25,6 @@ import androidx.compose.ui.focus.FocusDirection import androidx.compose.ui.focus.onFocusChanged import androidx.compose.ui.geometry.Offset import androidx.compose.ui.graphics.StrokeCap -import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.compose.ui.res.stringResource @@ -34,11 +35,9 @@ import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.input.OffsetMapping import androidx.compose.ui.text.input.TransformedText import androidx.compose.ui.text.input.VisualTransformation -import androidx.compose.ui.text.rememberTextMeasurer import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.core.text.isDigitsOnly import com.poti.android.R @@ -61,22 +60,9 @@ fun EditOptionPrice( imeAction: ImeAction = ImeAction.Done, enabled: Boolean = true, ) { - val density = LocalDensity.current - val measurer = rememberTextMeasurer() - val textStyle = PotiTheme.typography.body16sb val transformation = remember { PriceVisualTransformation() } - val transformedText = remember(value) { - transformation.filter(AnnotatedString(value)).text.text - } - - val textWidth = remember(transformedText, textStyle) { - density.run { - measurer.measure(transformedText, textStyle).size.width.toDp() - } - } - Row( modifier = modifier.fillMaxWidth(), ) { @@ -116,7 +102,6 @@ fun EditOptionPrice( textStyle = textStyle, onFocusChanged = onFocusChanged, enabled = enabled, - textWidth = textWidth, ) Spacer(Modifier.width(4.dp)) @@ -138,7 +123,6 @@ private fun OptionTextField( textStyle: TextStyle, onFocusChanged: (Boolean) -> Unit, enabled: Boolean, - textWidth: Dp, modifier: Modifier = Modifier, ) { val focusManager = LocalFocusManager.current @@ -149,23 +133,23 @@ private fun OptionTextField( value = value, onValueChange = onValueChanged, modifier = modifier + .width(IntrinsicSize.Min) + .widthIn(2.dp) .onFocusChanged { focusState -> onFocusChanged(focusState.isFocused) } .drawWithCache { val minPx = 42.dp.toPx() - val textPx = textWidth.toPx() - val underlinePx = max(minPx, textPx) - val strokePx = 2.dp.toPx() val yOffset = strokePx / 2 - 4.dp.toPx() onDrawBehind { + val underlineWidth = max(size.width, minPx) val y = size.height - yOffset drawLine( color = colors.gray300, - start = Offset(size.width - underlinePx, y), + start = Offset(size.width - underlineWidth, y), end = Offset(size.width, y), strokeWidth = strokePx, cap = StrokeCap.Round, From b3d20dfc189d5fd856531b5e4ca8ee443a49d8d1 Mon Sep 17 00:00:00 2001 From: dodo Date: Sat, 7 Feb 2026 15:03:00 +0900 Subject: [PATCH 08/11] =?UTF-8?q?[Fix/#141]=20=EC=98=A4=ED=83=88=EC=9E=90?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../party/create/component/EditOptionPrice.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index 10a83f63..146a73bd 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -194,15 +194,15 @@ private class PriceVisualTransformation : VisualTransformation { override fun originalToTransformed(offset: Int): Int { if (offset >= originalText.length) return transformedText.length - val numbersAtferCursor = originalText.length - offset + val numbersAfterCursor = originalText.length - offset - val commasAfterCursor = if (numbersAtferCursor % 3 == 0) { - numbersAtferCursor / 3 - 1 + val commasAfterCursor = if (numbersAfterCursor % 3 == 0) { + numbersAfterCursor / 3 - 1 } else { - numbersAtferCursor / 3 + numbersAfterCursor / 3 } - return transformedText.length - numbersAtferCursor - commasAfterCursor + return transformedText.length - numbersAfterCursor - commasAfterCursor } override fun transformedToOriginal(offset: Int): Int { From df4ece2b6aab028200e1f33195b9f9f1ea192c69 Mon Sep 17 00:00:00 2001 From: dodo Date: Sat, 7 Feb 2026 16:45:55 +0900 Subject: [PATCH 09/11] =?UTF-8?q?[Fix/#141]=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=EC=B5=9C=EC=86=8C=EB=84=88=EB=B9=84=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20singleLine=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/party/create/component/EditOptionPrice.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index 146a73bd..65ee6616 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -134,7 +134,7 @@ private fun OptionTextField( onValueChange = onValueChanged, modifier = modifier .width(IntrinsicSize.Min) - .widthIn(2.dp) + .widthIn(42.dp) .onFocusChanged { focusState -> onFocusChanged(focusState.isFocused) } @@ -175,7 +175,7 @@ private fun OptionTextField( ) }, ), - singleLine = true, + maxLines = 1, visualTransformation = transformation, decorationBox = { innerTextField -> innerTextField() From f74da44af407854526906c43bffe843dc3dee3e4 Mon Sep 17 00:00:00 2001 From: dodo Date: Sat, 7 Feb 2026 16:53:55 +0900 Subject: [PATCH 10/11] =?UTF-8?q?[Refactor/#141]=20=EC=96=B8=EB=8D=94?= =?UTF-8?q?=EB=9D=BC=EC=9D=B8=20offset=20=EA=B3=84=EC=82=B0=20=EA=B0=84?= =?UTF-8?q?=EC=86=8C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/party/create/component/EditOptionPrice.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index 65ee6616..a0c942f2 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -139,17 +139,15 @@ private fun OptionTextField( onFocusChanged(focusState.isFocused) } .drawWithCache { - val minPx = 42.dp.toPx() val strokePx = 2.dp.toPx() val yOffset = strokePx / 2 - 4.dp.toPx() onDrawBehind { - val underlineWidth = max(size.width, minPx) val y = size.height - yOffset drawLine( color = colors.gray300, - start = Offset(size.width - underlineWidth, y), + start = Offset(0f, y), end = Offset(size.width, y), strokeWidth = strokePx, cap = StrokeCap.Round, From 033cec4d0332b5a0281ac19192da5d04811d99fb Mon Sep 17 00:00:00 2001 From: dodo Date: Sat, 7 Feb 2026 16:54:54 +0900 Subject: [PATCH 11/11] =?UTF-8?q?[Chore/#141]=20ktlint=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/party/create/component/EditOptionPrice.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt index a0c942f2..af5a23c0 100644 --- a/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt +++ b/app/src/main/java/com/poti/android/presentation/party/create/component/EditOptionPrice.kt @@ -44,7 +44,6 @@ import com.poti.android.R import com.poti.android.core.common.extension.toMoneyString import com.poti.android.core.designsystem.component.display.PotiCheckBox import com.poti.android.core.designsystem.theme.PotiTheme -import kotlin.math.max private const val MAX_LENGTH = 9