fix(ui): 统一播放页右侧操作栏顺序为收藏-点赞-评论-分享
与推荐页操作栏保持一致,同步更新布局断言。
This commit is contained in:
1 parent
d206465ee1
commit
e028ca40b1
2 files changed
+11
-11
No files matched your search
@@ -178,14 +178,6 @@ class PlayerPlaybackOverlay extends StatelessWidget {
|
|||||||
selected: data.saved,
|
selected: data.saved,
|
||||||
onTap: actions.onSave,
|
onTap: actions.onSave,
|
||||||
),
|
),
|
||||||
InteractionRailItem(
|
|
||||||
key: const Key('player-rail-comments'),
|
|
||||||
asset: 'assets/icon/rail/rail_comment.png',
|
|
||||||
label: data.l10n.comments,
|
|
||||||
count: data.commentCount,
|
|
||||||
countKey: const Key('player-rail-comments-count'),
|
|
||||||
onTap: actions.onComments,
|
|
||||||
),
|
|
||||||
InteractionRailItem(
|
InteractionRailItem(
|
||||||
key: const Key('player-rail-like'),
|
key: const Key('player-rail-like'),
|
||||||
asset: 'assets/icon/rail/rail_like.png',
|
asset: 'assets/icon/rail/rail_like.png',
|
||||||
@@ -196,6 +188,14 @@ class PlayerPlaybackOverlay extends StatelessWidget {
|
|||||||
selectedColor: AppColors.doubleTapHeartRed,
|
selectedColor: AppColors.doubleTapHeartRed,
|
||||||
onTap: actions.onLike,
|
onTap: actions.onLike,
|
||||||
),
|
),
|
||||||
|
InteractionRailItem(
|
||||||
|
key: const Key('player-rail-comments'),
|
||||||
|
asset: 'assets/icon/rail/rail_comment.png',
|
||||||
|
label: data.l10n.comments,
|
||||||
|
count: data.commentCount,
|
||||||
|
countKey: const Key('player-rail-comments-count'),
|
||||||
|
onTap: actions.onComments,
|
||||||
|
),
|
||||||
InteractionRailItem(
|
InteractionRailItem(
|
||||||
key: const Key('player-rail-share'),
|
key: const Key('player-rail-share'),
|
||||||
asset: 'assets/icon/rail/rail_share.png',
|
asset: 'assets/icon/rail/rail_share.png',
|
||||||
|
|||||||
@@ -1359,9 +1359,9 @@ void main() {
|
|||||||
final shareRect = tester.getRect(
|
final shareRect = tester.getRect(
|
||||||
find.byKey(const Key('player-rail-share')),
|
find.byKey(const Key('player-rail-share')),
|
||||||
);
|
);
|
||||||
expect(commentsRect.top - saveRect.bottom, closeTo(24, 0.1));
|
expect(likeRect.top - saveRect.bottom, closeTo(24, 0.1));
|
||||||
expect(likeRect.top - commentsRect.bottom, closeTo(24, 0.1));
|
expect(commentsRect.top - likeRect.bottom, closeTo(24, 0.1));
|
||||||
expect(shareRect.top - likeRect.bottom, closeTo(24, 0.1));
|
expect(shareRect.top - commentsRect.bottom, closeTo(24, 0.1));
|
||||||
|
|
||||||
final saveButton = tester.widget<IconButton>(
|
final saveButton = tester.widget<IconButton>(
|
||||||
find.descendant(
|
find.descendant(
|
||||||
|
|||||||
Reference in new issue
Block a user