Skip to content

Commit

Permalink
[HOTFIX/#193] final QA 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
angryPodo committed Jan 24, 2025
1 parent 1b42521 commit 93fc296
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class MapViewModel @Inject constructor(
).onSuccess { response ->
_state.update {
it.copy(
placeCount = response.size,
addedPlaceList = if (response.isEmpty()) {
UiState.Success(
response.toImmutableList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
Expand Down Expand Up @@ -67,6 +68,7 @@ private fun MapSearchScreen(
onDeleteAllButtonClick: () -> Unit
) {
val focusRequester = remember { FocusRequester() }
val focusManager = LocalFocusManager.current

LaunchedEffect(Unit) {
focusRequester.requestFocus()
Expand Down Expand Up @@ -122,8 +124,13 @@ private fun MapSearchScreen(
) { searchKeyword ->
MapSearchRecentItem(
searchText = searchKeyword,
onClick = {
onClickIcon = {
onDeleteButtonClick(searchKeyword)
},
onClickText = {
onSearchKeywordChanged(searchKeyword)
onSearchButtonClick()
focusManager.clearFocus()
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import com.spoony.spoony.core.util.extension.noRippleClickable
@Composable
fun MapSearchRecentItem(
searchText: String,
onClick: () -> Unit,
onClickIcon: () -> Unit,
onClickText: () -> Unit,
modifier: Modifier = Modifier
) {
Row(
Expand All @@ -30,6 +31,7 @@ fun MapSearchRecentItem(
color = SpoonyAndroidTheme.colors.black,
modifier = Modifier
.weight(1f)
.noRippleClickable(onClick = onClickText)
)

Icon(
Expand All @@ -38,7 +40,7 @@ fun MapSearchRecentItem(
tint = SpoonyAndroidTheme.colors.gray400,
modifier = Modifier
.padding(vertical = 14.dp)
.noRippleClickable(onClick = onClick)
.noRippleClickable(onClick = onClickIcon)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fun PlaceDetailRoute(
modifier = Modifier
.navigationBarsPadding(),
addMapCount = state.addMapCount,
isScooped = state.isScooped,
isScooped = state.isScooped || data.isMine,
isAddMap = state.isAddMap,
onScoopButtonClick = {
scoopDialogVisibility = true
Expand Down Expand Up @@ -188,7 +188,7 @@ fun PlaceDetailRoute(
date = data.date.formatToYearMonthDay(),
placeAddress = data.placeAddress,
placeName = data.placeName,
isScooped = state.isScooped,
isScooped = state.isScooped || data.isMine,
dropdownMenuList = dropDownMenuList,
onReportButtonClick = { navigateToReport(postId) }
)
Expand Down

0 comments on commit 93fc296

Please sign in to comment.