From 29c247abc1773d2228e4bc0f9048e61d24294535 Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Thu, 29 Jan 2026 19:52:07 +0900 Subject: [PATCH] =?UTF-8?q?fix(location):=20=EC=B6=94=EC=B2=9C=20=EC=97=94?= =?UTF-8?q?=EC=A7=84=EC=97=90=EC=84=9C=20=EC=B5=9C=EC=8B=A0=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=20=EC=82=AC=EC=9A=A9=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - _generateCandidate(): currentLocationProvider → currentLocationWithFallbackProvider - EnhancedRecommendationNotifier: 동일하게 수정 - 백그라운드 복귀 시 캐시된 위치 대신 실시간 위치 사용 --- lib/presentation/providers/recommendation_provider.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/presentation/providers/recommendation_provider.dart b/lib/presentation/providers/recommendation_provider.dart index 22c894e..ebeaf2a 100644 --- a/lib/presentation/providers/recommendation_provider.dart +++ b/lib/presentation/providers/recommendation_provider.dart @@ -166,8 +166,8 @@ class RecommendationNotifier extends StateNotifier> { required List selectedCategories, List excludedRestaurantIds = const [], }) async { - // 현재 위치 가져오기 - final location = await _ref.read(currentLocationProvider.future); + // 현재 위치 가져오기 (StreamProvider에서 최신 위치 사용) + final location = _ref.read(currentLocationWithFallbackProvider).valueOrNull; if (location == null) { throw Exception('위치 정보를 가져올 수 없습니다'); } @@ -382,8 +382,8 @@ class EnhancedRecommendationNotifier return; } - // 현재 위치 가져오기 - final location = await _ref.read(currentLocationProvider.future); + // 현재 위치 가져오기 (StreamProvider에서 최신 위치 사용) + final location = _ref.read(currentLocationWithFallbackProvider).valueOrNull; if (location == null) { state = state.copyWith(error: '위치 정보를 가져올 수 없습니다', isLoading: false); return;