fix: 맛집 중복 체크 및 카테고리 필터 로직 개선

1. placeId 기반 중복 체크 제거
   - 이전 대화에서 명확히 한 대로 placeId는 매칭에 사용하지 않음

2. 주소 기반 매칭 개선
   - 주소가 있을 때만 주소 기반 중복 체크 수행

3. 위치 기반 매칭 추가
   - 50m 이내 동일한 이름의 맛집 중복 체크 추가

4. 검색 결과 선택 로직 개선
   - 주소가 없을 때 가장 가까운 거리의 업체 선택

5. 카테고리 필터 버그 수정
   - 카테고리 표시명과 실제 값 불일치 문제 해결
   - 부분 일치 및 정규화된 비교 지원

6. 빈 상태 메시지 개선
   - 필터링 중일 때 적절한 안내 메시지 표시
   - 필터 초기화 버튼 추가

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
JiWoong Sul
2025-07-30 19:27:04 +09:00
parent 85fde36157
commit 9a61e2f391
4 changed files with 126 additions and 24 deletions

View File

@@ -150,25 +150,50 @@ class _RestaurantListScreenState extends ConsumerState<RestaurantListScreen> {
}
Widget _buildEmptyState(bool isDark) {
final selectedCategory = ref.watch(selectedCategoryProvider);
final searchQuery = ref.watch(searchQueryProvider);
final isFiltering = selectedCategory != null || searchQuery.isNotEmpty;
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.restaurant_menu,
isFiltering ? Icons.search_off : Icons.restaurant_menu,
size: 80,
color: isDark ? AppColors.darkTextSecondary : AppColors.lightTextSecondary,
),
const SizedBox(height: 16),
Text(
'아직 등록된 맛집이 없어요',
isFiltering
? '조건에 맞는 맛집이 없어요'
: '아직 등록된 맛집이 없어요',
style: AppTypography.heading2(isDark),
),
const SizedBox(height: 8),
Text(
'+ 버튼을 눌러 맛집을 추가해보세요',
isFiltering
? selectedCategory != null
? '선택한 카테고리에 해당하는 맛집이 없습니다'
: '검색 결과가 없습니다'
: '+ 버튼을 눌러 맛집을 추가해보세요',
style: AppTypography.body2(isDark),
),
if (isFiltering) ...[
const SizedBox(height: 16),
TextButton(
onPressed: () {
ref.read(selectedCategoryProvider.notifier).state = null;
ref.read(searchQueryProvider.notifier).state = '';
},
child: Text(
'필터 초기화',
style: TextStyle(
color: AppColors.lightPrimary,
),
),
),
],
],
),
);