Skip to content

Commit 9f167a6

Browse files
committed
fix(headlines-feed): update user content preferences fetch call
- Add userId parameter to repository read method in two locations - Update go_router dependency to version 16.2.0 - Update pubspec.lock file with new resolved reference
1 parent dc3ef67 commit 9f167a6

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

lib/headlines-feed/bloc/headlines_feed_bloc.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ class HeadlinesFeedBloc extends Bloc<HeadlinesFeedEvent, HeadlinesFeedState> {
164164

165165
// Fetch user content preferences to get followed items for filtering suggestions.
166166
final userPreferences = currentUser?.id != null
167-
? await _userContentPreferencesRepository.read(id: currentUser!.id)
167+
? await _userContentPreferencesRepository.read(
168+
id: currentUser!.id,
169+
userId: currentUser.id,
170+
)
168171
: null;
169172

170173
// For a major load, use the full decoration pipeline, which includes
@@ -251,7 +254,10 @@ class HeadlinesFeedBloc extends Bloc<HeadlinesFeedEvent, HeadlinesFeedState> {
251254

252255
// Fetch user content preferences to get followed items for filtering suggestions.
253256
final userPreferences = currentUser?.id != null
254-
? await _userContentPreferencesRepository.read(id: currentUser!.id)
257+
? await _userContentPreferencesRepository.read(
258+
id: currentUser!.id,
259+
userId: currentUser.id,
260+
)
255261
: null;
256262

257263
// Use the full decoration pipeline, which includes injecting a

pubspec.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ packages:
237237
description:
238238
path: "."
239239
ref: HEAD
240-
resolved-ref: f12b8a78ee3ca0ca18b356e4c89f1d9171e2be61
240+
resolved-ref: "3c65d089851c9b3be8cae384ead7c157c0c412a6"
241241
url: "https://github.com/flutter-news-app-full-source-code/data-inmemory.git"
242242
source: git
243243
version: "0.0.0"
@@ -426,10 +426,10 @@ packages:
426426
dependency: "direct main"
427427
description:
428428
name: go_router
429-
sha256: "8b1f37dfaf6e958c6b872322db06f946509433bec3de753c3491a42ae9ec2b48"
429+
sha256: ced3fdc143c1437234ac3b8e985f3286cf138968bb83ca9a6f94d22f2951c6b9
430430
url: "https://pub.dev"
431431
source: hosted
432-
version: "16.1.0"
432+
version: "16.2.0"
433433
google_fonts:
434434
dependency: "direct main"
435435
description:

0 commit comments

Comments
 (0)