opt: image preview

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-28 17:03:17 +08:00
parent f5d7dc6b6a
commit 959d4de78a
3 changed files with 10 additions and 4 deletions

View File

@@ -162,7 +162,7 @@ Widget imageview(
},
),
),
if (picArr[index].liveUrl?.isNotEmpty == true)
if (picArr[index].isLivePhoto)
const PBadge(
text: 'Live',
right: 8,

View File

@@ -468,8 +468,14 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
// });
// },
),
SourceType.livePhoto =>
IgnorePointer(child: Video(controller: _videoController!)),
SourceType.livePhoto => Obx(() => currentIndex.value == index
? IgnorePointer(
child: Video(
controller: _videoController!,
fill: Colors.transparent,
),
)
: const SizedBox.shrink()),
},
),
);

View File

@@ -1917,7 +1917,7 @@ List<SettingsModel> get extraSettings => [
SettingsModel(
settingsType: SettingsType.sw1tch,
title: '预览 Live Photo',
subtitle: '开启则以视频形式预览Live Photo否则预览静态图片',
subtitle: '开启则以视频形式预览 Live Photo否则预览静态图片',
leading: Icon(Icons.image_outlined),
setKey: SettingBoxKey.enableLivePhoto,
defaultVal: true,