From 8e99ff1173efcdf218873e05ee68f4fb7e2da0c6 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Tue, 25 Feb 2025 18:27:04 +0800 Subject: [PATCH] mod: search: show user verf Closes #322 Signed-off-by: bggRGjQaUbCoE --- .../search_panel/widgets/user_panel.dart | 36 ++++++++++++++++--- lib/plugin/pl_player/view.dart | 11 +++--- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/lib/pages/search_panel/widgets/user_panel.dart b/lib/pages/search_panel/widgets/user_panel.dart index 74d161b4..324896f3 100644 --- a/lib/pages/search_panel/widgets/user_panel.dart +++ b/lib/pages/search_panel/widgets/user_panel.dart @@ -99,11 +99,37 @@ Widget searchUserPanel(BuildContext context, child: Row( children: [ const SizedBox(width: 15), - NetworkImgLayer( - width: 42, - height: 42, - src: i.upic, - type: 'avatar', + Stack( + clipBehavior: Clip.none, + children: [ + NetworkImgLayer( + width: 42, + height: 42, + src: i.upic, + type: 'avatar', + ), + if (i.officialVerify?['type'] == 0 || + i.officialVerify?['type'] == 1) + Positioned( + bottom: 0, + right: 0, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Theme.of(context) + .colorScheme + .surface, + ), + child: Icon( + Icons.offline_bolt, + color: i.officialVerify?['type'] == 0 + ? Colors.yellow + : Colors.lightBlueAccent, + size: 14, + ), + ), + ), + ], ), const SizedBox(width: 10), Column( diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index 6b7a3e93..89169a72 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -772,12 +772,11 @@ class _PLVideoPlayerState extends State final Duration result = pos.clamp(Duration.zero, plPlayerController.duration.value); final height = renderBox.size.height * 0.125; - if ((details.localFocalPoint.dx >= - renderBox.size.width * 0.875 && - details.localFocalPoint.dy <= height) || - (details.localFocalPoint.dx <= - renderBox.size.width * 0.125 && - details.localFocalPoint.dy <= height)) { + if (details.localFocalPoint.dy <= height && + (details.localFocalPoint.dx >= + renderBox.size.width * 0.875 || + details.localFocalPoint.dx <= + renderBox.size.width * 0.125)) { plPlayerController.cancelSeek = true; plPlayerController.showPreview.value = false; if (plPlayerController.hasToast != true) {