From 091ea358bd44e8de1fc759e6dc0468b504def1e1 Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Thu, 22 Oct 2026 21:20:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E8=BF=BD=E5=89=A7?= =?UTF-8?q?=E5=8A=A0=E5=8F=B7=E5=8D=A1=E7=89=87=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/plans/PROGRESS.md | 1 + lib/pages/following/following_page.dart | 4 ++-- test/following/following_page_test.dart | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/plans/PROGRESS.md b/docs/plans/PROGRESS.md index 1d91fd3..aaa039f 100644 --- a/docs/plans/PROGRESS.md +++ b/docs/plans/PROGRESS.md @@ -1240,4 +1240,5 @@ $ flutter test - 追剧保持三列网格,播放历史改为左封面右信息的单列列表,行距 16。 - 历史卡片补充 96×128 封面、观看进度、已看百分比、继续观看和编辑删除。 +- 追剧加号卡片移到全部追剧卡片之后,空列表时仍在左上角。 - 刷新、分页与各页独立滚动位置保持;`flutter analyze`:No issues found。 diff --git a/lib/pages/following/following_page.dart b/lib/pages/following/following_page.dart index e1d99ec..250db53 100644 --- a/lib/pages/following/following_page.dart +++ b/lib/pages/following/following_page.dart @@ -269,10 +269,10 @@ class _FavoritesGrid extends StatelessWidget { itemCount: controller.cards.length + 1, empty: const SizedBox.shrink(), itemBuilder: (context, index) { - if (index == 0) { + if (index == controller.cards.length) { return FollowingAddCard(onTap: onGoHome); } - final drama = controller.cards[index - 1]; + final drama = controller.cards[index]; final episode = drama.episodes.isEmpty ? 1 : drama.episodes.first.number; diff --git a/test/following/following_page_test.dart b/test/following/following_page_test.dart index d534ea4..ff0f371 100644 --- a/test/following/following_page_test.dart +++ b/test/following/following_page_test.dart @@ -116,6 +116,12 @@ void main() { tester.getTopLeft(titleFinder).dx, tester.getTopLeft(coverFinder).dx, ); + expect( + tester.getTopLeft(card).dx, + lessThan( + tester.getTopLeft(find.byKey(const Key('following-add-card'))).dx, + ), + ); await tester.tap(find.byKey(const Key('following-edit'))); await tester.pumpAndSettle();