Skip to content

Commit

Permalink
[fix] #76 기타 브랜드 마커 그대로 표시되는 이슈 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ows3090 committed May 18, 2024
1 parent 13b8dba commit 7a79e66
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
8 changes: 4 additions & 4 deletions feature/map/src/main/java/com/yapp/buddycon/map/MapScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ private fun MapBottomSheet(
.heightIn(
min = BottomSheetValue.Collapsed.sheetPeekHeightDp.dp,
max = BottomSheetValue.Expanded.sheetPeekHeightDp.dp
).fillMaxSize()
)
.fillMaxSize()
.background(BuddyConTheme.colors.background)
.pointerInput(Unit) {
detectVerticalDragGestures(
Expand Down Expand Up @@ -254,7 +255,7 @@ private fun MapBottomSheet(
else -> {
GifticonInfoModalSheetContent(
countOfUsableGifticon = mapUiState.totalCount,
countOfImminetGifticon = mapUiState.deadLineCount,
countOfImminetGifticon = mapUiState.deadLineCount
)
}
}
Expand Down Expand Up @@ -498,7 +499,7 @@ private fun transitionBottomSheet(
current: BottomSheetValue,
offset: Float
): BottomSheetValue {
val value = if (offset > 0f) {
return if (offset > 0f) {
when (current) {
BottomSheetValue.Collapsed -> BottomSheetValue.PartiallyExpanded
BottomSheetValue.PartiallyExpanded -> BottomSheetValue.Expanded
Expand All @@ -511,5 +512,4 @@ private fun transitionBottomSheet(
BottomSheetValue.Expanded -> BottomSheetValue.PartiallyExpanded
}
}
return value
}
17 changes: 11 additions & 6 deletions feature/map/src/main/java/com/yapp/buddycon/map/MapViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.yapp.buddycon.utility.stability.MapSearchPlace
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.zip
Expand Down Expand Up @@ -73,12 +74,16 @@ class MapViewModel @Inject constructor(
) {
if (stores.isEmpty()) return
stores.map { store ->
kakaoRepository.searchPlacesByKeyword(
query = store.value,
x = x,
y = y,
radius = 2000
)
if (store == GifticonStore.NONE || store == GifticonStore.OTHERS) {
flowOf(listOf())
} else {
kakaoRepository.searchPlacesByKeyword(
query = store.value,
x = x,
y = y,
radius = 2000
)
}
}.reduce { acc, flow ->
acc.zip(flow) { searchPlaceModels, searchPlaceModel ->
searchPlaceModels + searchPlaceModel
Expand Down

0 comments on commit 7a79e66

Please sign in to comment.