mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: handle medialist url
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -41,11 +41,8 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void listener() {
|
void listener() {
|
||||||
if (_favDetailController.scrollController.offset > 160) {
|
_favDetailController.titleCtr.value =
|
||||||
_favDetailController.titleCtr.value = true;
|
_favDetailController.scrollController.offset >= 120;
|
||||||
} else if (_favDetailController.scrollController.offset <= 160) {
|
|
||||||
_favDetailController.titleCtr.value = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -95,7 +92,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
icon: const Icon(Icons.close_outlined),
|
icon: const Icon(Icons.close_outlined),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
expandedHeight: 200 - MediaQuery.of(context).padding.top,
|
expandedHeight: kTextTabBarHeight + 130,
|
||||||
pinned: true,
|
pinned: true,
|
||||||
title: _favDetailController.enableMultiSelect.value
|
title: _favDetailController.enableMultiSelect.value
|
||||||
? Text(
|
? Text(
|
||||||
@@ -316,7 +313,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
],
|
],
|
||||||
flexibleSpace: FlexibleSpaceBar(
|
flexibleSpace: FlexibleSpaceBar(
|
||||||
background: Container(
|
background: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: kTextTabBarHeight +
|
top: kTextTabBarHeight +
|
||||||
MediaQuery.of(context).padding.top +
|
MediaQuery.of(context).padding.top +
|
||||||
@@ -333,7 +330,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
Hero(
|
Hero(
|
||||||
tag: _favDetailController.heroTag,
|
tag: _favDetailController.heroTag,
|
||||||
child: NetworkImgLayer(
|
child: NetworkImgLayer(
|
||||||
width: 180,
|
width: 110 * StyleString.aspectRatio,
|
||||||
height: 110,
|
height: 110,
|
||||||
src: _favDetailController.item.value.cover,
|
src: _favDetailController.item.value.cover,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -665,6 +665,21 @@ class PiliScheme {
|
|||||||
}
|
}
|
||||||
launchURL();
|
launchURL();
|
||||||
return false;
|
return false;
|
||||||
|
case 'medialist':
|
||||||
|
String? mediaId = RegExp(r'/ml(\d+)').firstMatch(path)?.group(1);
|
||||||
|
if (mediaId != null) {
|
||||||
|
PageUtils.toDupNamed(
|
||||||
|
'/favDetail',
|
||||||
|
parameters: {
|
||||||
|
'mediaId': mediaId,
|
||||||
|
'heroTag': Utils.makeHeroTag(mediaId),
|
||||||
|
},
|
||||||
|
off: off,
|
||||||
|
);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
launchURL();
|
||||||
|
return false;
|
||||||
default:
|
default:
|
||||||
Map map = IdUtils.matchAvorBv(input: area?.split('?').first);
|
Map map = IdUtils.matchAvorBv(input: area?.split('?').first);
|
||||||
if (map.isNotEmpty) {
|
if (map.isNotEmpty) {
|
||||||
|
|||||||
Reference in New Issue
Block a user