mod: save dyn live cover

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-20 22:09:34 +08:00
parent 8525764fd4
commit bd3809f996
3 changed files with 29 additions and 3 deletions

View File

@@ -65,6 +65,18 @@ class DynamicPanel extends StatelessWidget {
title: item.modules.moduleDynamic.major.pgc.title, title: item.modules.moduleDynamic.major.pgc.title,
cover: item.modules.moduleDynamic.major.pgc.cover, cover: item.modules.moduleDynamic.major.pgc.cover,
); );
} else if (item.type == 'DYNAMIC_TYPE_LIVE_RCMD') {
imageSaveDialog(
context: context,
title: item.modules.moduleDynamic.major.liveRcmd.title,
cover: item.modules.moduleDynamic.major.liveRcmd.cover,
);
} else if (item.type == 'DYNAMIC_TYPE_LIVE') {
imageSaveDialog(
context: context,
title: item.modules.moduleDynamic.major.live.title,
cover: item.modules.moduleDynamic.major.live.cover,
);
} }
}, },
child: Column( child: Column(

View File

@@ -166,6 +166,18 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
title: item.orig.modules.moduleDynamic.major.pgc.title, title: item.orig.modules.moduleDynamic.major.pgc.title,
cover: item.orig.modules.moduleDynamic.major.pgc.cover, cover: item.orig.modules.moduleDynamic.major.pgc.cover,
); );
} else if (item.type == 'DYNAMIC_TYPE_LIVE_RCMD') {
imageSaveDialog(
context: context,
title: item.modules.moduleDynamic.major.liveRcmd.title,
cover: item.modules.moduleDynamic.major.liveRcmd.cover,
);
} else if (item.type == 'DYNAMIC_TYPE_LIVE') {
imageSaveDialog(
context: context,
title: item.modules.moduleDynamic.major.live.title,
cover: item.modules.moduleDynamic.major.live.cover,
);
} }
}, },
child: Container( child: Container(

View File

@@ -151,7 +151,6 @@ class _UpPanelState extends State<UpPanel> {
} }
}, },
onLongPress: () { onLongPress: () {
feedBack();
if (data.mid == -1) { if (data.mid == -1) {
return; return;
} }
@@ -187,7 +186,7 @@ class _UpPanelState extends State<UpPanel> {
), ),
), ),
Positioned( Positioned(
top: 0, top: data.type == 'live' ? -5 : 0,
right: data.type == 'live' ? -6 : 4, right: data.type == 'live' ? -6 : 4,
child: Badge( child: Badge(
smallSize: 8, smallSize: 8,
@@ -198,7 +197,10 @@ class _UpPanelState extends State<UpPanel> {
isLabelVisible: data.type == 'live' || isLabelVisible: data.type == 'live' ||
(data.type == 'up' && (data.hasUpdate ?? false)), (data.type == 'up' && (data.hasUpdate ?? false)),
backgroundColor: data.type == 'live' backgroundColor: data.type == 'live'
? Theme.of(context).colorScheme.secondaryContainer ? Theme.of(context)
.colorScheme
.secondaryContainer
.withOpacity(0.75)
: Theme.of(context).colorScheme.primary, : Theme.of(context).colorScheme.primary,
), ),
), ),