From 5da7ccc8efc859ca0179412021cb0925dca1a0d7 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 1 Apr 2025 00:14:12 +0800 Subject: [PATCH] :bug: Fix getFeed isn't using the ListPostV2 --- lib/providers/post.dart | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/providers/post.dart b/lib/providers/post.dart index d2c2867..6ad01dc 100644 --- a/lib/providers/post.dart +++ b/lib/providers/post.dart @@ -33,11 +33,14 @@ class SnPostContentProvider { } Future> getFeed({int take = 20, DateTime? cursor}) async { - final resp = - await _sn.client.get('/cgi/co/recommendations/feed', queryParameters: { - 'take': take, - if (cursor != null) 'cursor': cursor.toUtc().millisecondsSinceEpoch, - }); + final resp = await _sn.client.get( + '/cgi/co/recommendations/feed', + queryParameters: { + 'take': take, + if (cursor != null) 'cursor': cursor.toUtc().millisecondsSinceEpoch, + }, + options: Options(headers: {'X-API-Version': '2'}), + ); final List out = List.from(resp.data.map((ele) => SnFeedEntry.fromJson(ele)));