mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: member page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -95,6 +95,7 @@ class _DynamicSliverAppBarState extends State<DynamicSliverAppBar> {
|
||||
// As long as the height is 0 instead of the sliver app bar a sliver to box adapter will be used
|
||||
// to calculate dynamically the size for the sliver app bar
|
||||
double _height = 0;
|
||||
Orientation? _orientation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -105,6 +106,7 @@ class _DynamicSliverAppBarState extends State<DynamicSliverAppBar> {
|
||||
@override
|
||||
void didUpdateWidget(covariant DynamicSliverAppBar oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
|
||||
_updateHeight();
|
||||
}
|
||||
|
||||
@@ -124,6 +126,11 @@ class _DynamicSliverAppBarState extends State<DynamicSliverAppBar> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
//Needed to lay out the flexibleSpace the first time, so we can calculate its intrinsic height
|
||||
Orientation orientation = MediaQuery.orientationOf(context);
|
||||
if (_orientation != orientation) {
|
||||
_orientation = orientation;
|
||||
_height = 0;
|
||||
}
|
||||
if (_height == 0) {
|
||||
return SliverToBoxAdapter(
|
||||
child: Stack(
|
||||
|
||||
@@ -50,7 +50,8 @@ class VideoCardH extends StatelessWidget {
|
||||
excludeSemantics: true,
|
||||
customSemanticsActions: <CustomSemanticsAction, void Function()>{
|
||||
for (var item in actions)
|
||||
CustomSemanticsAction(label: item.title): item.onTap!,
|
||||
CustomSemanticsAction(
|
||||
label: item.title.isEmpty ? 'label' : item.title): item.onTap!,
|
||||
},
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
|
||||
@@ -24,19 +24,20 @@ class VideoCustomActions {
|
||||
late List<VideoCustomAction> actions;
|
||||
VideoCustomActions(this.videoItem, this.context) {
|
||||
actions = [
|
||||
VideoCustomAction(
|
||||
videoItem.bvid,
|
||||
'copy',
|
||||
Stack(
|
||||
children: [
|
||||
Icon(MdiIcons.identifier, size: 16),
|
||||
Icon(MdiIcons.circleOutline, size: 16),
|
||||
],
|
||||
if ((videoItem.bvid as String?)?.isNotEmpty == true)
|
||||
VideoCustomAction(
|
||||
videoItem.bvid,
|
||||
'copy',
|
||||
Stack(
|
||||
children: [
|
||||
Icon(MdiIcons.identifier, size: 16),
|
||||
Icon(MdiIcons.circleOutline, size: 16),
|
||||
],
|
||||
),
|
||||
() {
|
||||
Utils.copyText(videoItem.bvid);
|
||||
},
|
||||
),
|
||||
() {
|
||||
Utils.copyText(videoItem.bvid);
|
||||
},
|
||||
),
|
||||
VideoCustomAction(
|
||||
'稍后再看',
|
||||
'pause',
|
||||
|
||||
Reference in New Issue
Block a user