Skip to content

[bugfix] 축제 제휴 데이터가 없는 경우에는 필터에서도 사라지도록 수정#526

Open
chlwhdtn03 wants to merge 1 commit into
developfrom
bugfix/festival_filter_not_disabled
Open

[bugfix] 축제 제휴 데이터가 없는 경우에는 필터에서도 사라지도록 수정#526
chlwhdtn03 wants to merge 1 commit into
developfrom
bugfix/festival_filter_not_disabled

Conversation

@chlwhdtn03
Copy link
Copy Markdown
Collaborator

Summary

잇슈 iOS 앱을 보니까 현재 필터에 축제 탭이 없더라고요. 안드로이드에서도 축제 제휴 데이터가 없는 경우에 필터에서 사라지게 수정했습니다.

Android Studio 2026 05 22 151753@2x

Issue

  • Resolves #

To reviewers

@chlwhdtn03 chlwhdtn03 requested a review from PeraSite May 22, 2026 06:19
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces dynamic filter management in the map view by adding an availableFilters property to the MapState. The UI components have been updated to render only the filters provided by the state, which are now determined based on the presence of festival partnerships. Feedback suggests initializing availableFilters as an empty list to prevent UI flickering during the loading state and using a more maintainable filtering approach when excluding specific filter types.

val restaurantInfoList: List<RestaurantInfo> = emptyList(),
val storeType: StoreType? = null,
val selectedFilter: FilterType = FilterType.Mine,
val availableFilters: List<FilterType> = FilterType.entries,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

MapState의 초기값으로 availableFiltersFilterType.entries로 설정되어 있습니다. fetchUserCollegeDepartment가 완료되기 전(UiState.Init 또는 Loading 상태)에도 UI가 렌더링될 경우, 모든 필터가 잠시 노출되었다가 사라지는 현상이 발생할 수 있습니다. 초기값을 빈 리스트로 설정하거나, 항상 노출되는 기본 필터만 포함하는 것이 사용자 경험 측면에서 더 좋습니다.

Suggested change
val availableFilters: List<FilterType> = FilterType.entries,
val availableFilters: List<FilterType> = emptyList(),

Comment on lines +88 to +92
val availableFilters = if (hasFestival) {
FilterType.entries
} else {
listOf(FilterType.All, FilterType.Mine)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

availableFilters를 정의할 때 특정 필터를 제외한 나머지를 직접 리스트로 나열하기보다, FilterType.entries를 필터링하는 방식이 추후 새로운 필터 타입이 추가될 때 유지보수 측면에서 더 유리합니다.

Suggested change
val availableFilters = if (hasFestival) {
FilterType.entries
} else {
listOf(FilterType.All, FilterType.Mine)
}
val availableFilters = if (hasFestival) {
FilterType.entries
} else {
FilterType.entries.filter { it != FilterType.Festival }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant