mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-16 15:16:15 +08:00
@@ -100,9 +100,7 @@ class _DynamicsPageState extends State<DynamicsPage>
|
||||
return Center(
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () {
|
||||
_dynamicsController.queryFollowUp();
|
||||
},
|
||||
onPressed: _dynamicsController.queryFollowUp,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -68,22 +68,20 @@ class _ActionPanelState extends State<ActionPanel> {
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: TextButton.icon(
|
||||
onPressed: () {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
useSafeArea: true,
|
||||
builder: (context) => RepostPanel(
|
||||
item: widget.item,
|
||||
callback: () {
|
||||
int count =
|
||||
widget.item.modules.moduleStat?.forward?.count ?? 0;
|
||||
widget.item.modules.moduleStat!.forward!.count = count + 1;
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
onPressed: () => showModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
useSafeArea: true,
|
||||
builder: (context) => RepostPanel(
|
||||
item: widget.item,
|
||||
callback: () {
|
||||
int count =
|
||||
widget.item.modules.moduleStat?.forward?.count ?? 0;
|
||||
widget.item.modules.moduleStat!.forward!.count = count + 1;
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
icon: Icon(
|
||||
FontAwesomeIcons.shareFromSquare,
|
||||
size: 16,
|
||||
|
||||
@@ -30,9 +30,7 @@ Widget addWidget(
|
||||
borderRadius: borderRadius,
|
||||
onTap: ugc.jumpUrl == null
|
||||
? null
|
||||
: () {
|
||||
PiliScheme.routePushFromUrl(ugc.jumpUrl!);
|
||||
},
|
||||
: () => PiliScheme.routePushFromUrl(ugc.jumpUrl!),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
@@ -146,10 +144,8 @@ Widget addWidget(
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
onPressed: canJump
|
||||
? () {
|
||||
PiliScheme.routePushFromUrl(
|
||||
btn.jumpUrl!);
|
||||
}
|
||||
? () => PiliScheme.routePushFromUrl(
|
||||
btn.jumpUrl!)
|
||||
: btn.disable == 1
|
||||
? null
|
||||
: () async {
|
||||
@@ -214,9 +210,7 @@ Widget addWidget(
|
||||
children: content.items!.map((e) {
|
||||
return InkWell(
|
||||
borderRadius: borderRadius,
|
||||
onTap: () {
|
||||
PiliScheme.routePushFromUrl(e.jumpUrl!);
|
||||
},
|
||||
onTap: () => PiliScheme.routePushFromUrl(e.jumpUrl!),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12, vertical: 8),
|
||||
@@ -263,9 +257,8 @@ Widget addWidget(
|
||||
if (e.jumpDesc?.isNotEmpty == true) ...[
|
||||
const SizedBox(width: 10),
|
||||
FilledButton.tonal(
|
||||
onPressed: () {
|
||||
PiliScheme.routePushFromUrl(e.jumpUrl!);
|
||||
},
|
||||
onPressed: () =>
|
||||
PiliScheme.routePushFromUrl(e.jumpUrl!),
|
||||
style: FilledButton.styleFrom(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
@@ -306,17 +299,15 @@ Widget addWidget(
|
||||
borderRadius: borderRadius,
|
||||
child: InkWell(
|
||||
borderRadius: borderRadius,
|
||||
onTap: () {
|
||||
showVoteDialog(
|
||||
context,
|
||||
vote.voteId!,
|
||||
item.idStr is int
|
||||
? item.idStr
|
||||
: item.idStr is String
|
||||
? int.parse(item.idStr)
|
||||
: null,
|
||||
);
|
||||
},
|
||||
onTap: () => showVoteDialog(
|
||||
context,
|
||||
vote.voteId!,
|
||||
item.idStr is int
|
||||
? item.idStr
|
||||
: item.idStr is String
|
||||
? int.parse(item.idStr)
|
||||
: null,
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
@@ -359,17 +350,15 @@ Widget addWidget(
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
FilledButton.tonal(
|
||||
onPressed: () {
|
||||
showVoteDialog(
|
||||
context,
|
||||
vote.voteId!,
|
||||
item.idStr is int
|
||||
? item.idStr
|
||||
: item.idStr is String
|
||||
? int.parse(item.idStr)
|
||||
: null,
|
||||
);
|
||||
},
|
||||
onPressed: () => showVoteDialog(
|
||||
context,
|
||||
vote.voteId!,
|
||||
item.idStr is int
|
||||
? item.idStr
|
||||
: item.idStr is String
|
||||
? int.parse(item.idStr)
|
||||
: null,
|
||||
),
|
||||
style: FilledButton.styleFrom(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||
|
||||
@@ -47,15 +47,13 @@ Widget content(
|
||||
children: [
|
||||
if (item.modules.moduleDynamic?.topic != null)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
'/dynTopic',
|
||||
parameters: {
|
||||
'id': item.modules.moduleDynamic!.topic!.id!.toString(),
|
||||
'name': item.modules.moduleDynamic!.topic!.name!,
|
||||
},
|
||||
);
|
||||
},
|
||||
onTap: () => Get.toNamed(
|
||||
'/dynTopic',
|
||||
parameters: {
|
||||
'id': item.modules.moduleDynamic!.topic!.id!.toString(),
|
||||
'name': item.modules.moduleDynamic!.topic!.name!,
|
||||
},
|
||||
),
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
|
||||
@@ -96,15 +96,13 @@ Widget forWard(
|
||||
const SizedBox(height: 5),
|
||||
if (item.modules.moduleDynamic?.topic != null) ...[
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
'/dynTopic',
|
||||
parameters: {
|
||||
'id': item.modules.moduleDynamic!.topic!.id!.toString(),
|
||||
'name': item.modules.moduleDynamic!.topic!.name!,
|
||||
},
|
||||
);
|
||||
},
|
||||
onTap: () => Get.toNamed(
|
||||
'/dynTopic',
|
||||
parameters: {
|
||||
'id': item.modules.moduleDynamic!.topic!.id!.toString(),
|
||||
'name': item.modules.moduleDynamic!.topic!.name!,
|
||||
},
|
||||
),
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
@@ -389,9 +387,7 @@ Widget forWard(
|
||||
case 'DYNAMIC_TYPE_MUSIC':
|
||||
final Map music = item.modules.moduleDynamic!.major!.music!;
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
PageUtils.handleWebview("https:${music['jump_url']}");
|
||||
},
|
||||
onTap: () => PageUtils.handleWebview("https:${music['jump_url']}"),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding:
|
||||
@@ -439,11 +435,8 @@ Widget forWard(
|
||||
children: [
|
||||
if (floor == 2) ...[
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
'/member?mid=${item.modules.moduleAuthor!.mid}',
|
||||
);
|
||||
},
|
||||
onTap: () =>
|
||||
Get.toNamed('/member?mid=${item.modules.moduleAuthor!.mid}'),
|
||||
child: Row(
|
||||
children: [
|
||||
NetworkImgLayer(
|
||||
|
||||
@@ -66,9 +66,7 @@ Widget livePanel(
|
||||
],
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Get.toNamed('/liveRoom?roomid=${content.live?.id}');
|
||||
},
|
||||
onTap: () => Get.toNamed('/liveRoom?roomid=${content.live?.id}'),
|
||||
onLongPress: () {
|
||||
Feedback.forLongPress(context);
|
||||
imageSaveDialog(
|
||||
|
||||
@@ -54,15 +54,13 @@ Widget liveRcmdPanel(
|
||||
const SizedBox(height: 4),
|
||||
if (item.modules.moduleDynamic?.topic != null) ...[
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
'/dynTopic',
|
||||
parameters: {
|
||||
'id': item.modules.moduleDynamic!.topic!.id!.toString(),
|
||||
'name': item.modules.moduleDynamic!.topic!.name!,
|
||||
},
|
||||
);
|
||||
},
|
||||
onTap: () => Get.toNamed(
|
||||
'/dynTopic',
|
||||
parameters: {
|
||||
'id': item.modules.moduleDynamic!.topic!.id!.toString(),
|
||||
'name': item.modules.moduleDynamic!.topic!.name!,
|
||||
},
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
|
||||
@@ -83,9 +81,7 @@ Widget liveRcmdPanel(
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
PageUtils.pushDynDetail(item, floor);
|
||||
},
|
||||
onTap: () => PageUtils.pushDynDetail(item, floor),
|
||||
child: LayoutBuilder(
|
||||
builder: (context, box) {
|
||||
double width = box.maxWidth;
|
||||
|
||||
@@ -59,9 +59,7 @@ TextSpan? richNode(
|
||||
text: ' ${i.text}',
|
||||
style: style,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
Get.toNamed('/member?mid=${i.rid}');
|
||||
},
|
||||
..onTap = () => Get.toNamed('/member?mid=${i.rid}'),
|
||||
),
|
||||
);
|
||||
break;
|
||||
@@ -72,15 +70,13 @@ TextSpan? richNode(
|
||||
text: i.origText!,
|
||||
style: style,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
Get.toNamed(
|
||||
'/searchResult',
|
||||
parameters: {
|
||||
'keyword':
|
||||
i.origText!.substring(1, i.origText!.length - 1),
|
||||
},
|
||||
);
|
||||
},
|
||||
..onTap = () => Get.toNamed(
|
||||
'/searchResult',
|
||||
parameters: {
|
||||
'keyword':
|
||||
i.origText!.substring(1, i.origText!.length - 1),
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
break;
|
||||
@@ -172,15 +168,13 @@ TextSpan? richNode(
|
||||
text: '${i.origText} ',
|
||||
style: style,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/h5/lottery/result?business_id=${item.idStr}'
|
||||
},
|
||||
);
|
||||
},
|
||||
..onTap = () => Get.toNamed(
|
||||
'/webview',
|
||||
parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/h5/lottery/result?business_id=${item.idStr}'
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
break;
|
||||
@@ -204,9 +198,8 @@ TextSpan? richNode(
|
||||
recognizer: i.jumpUrl == null
|
||||
? null
|
||||
: (TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
PiliScheme.routePushFromUrl(i.jumpUrl!);
|
||||
}),
|
||||
..onTap =
|
||||
() => PiliScheme.routePushFromUrl(i.jumpUrl!)),
|
||||
),
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -39,12 +39,10 @@ class _UpPanelState extends State<UpPanel> {
|
||||
slivers: [
|
||||
SliverToBoxAdapter(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.dynamicsController.showLiveItems =
|
||||
!widget.dynamicsController.showLiveItems;
|
||||
});
|
||||
},
|
||||
onTap: () => setState(() {
|
||||
widget.dynamicsController.showLiveItems =
|
||||
!widget.dynamicsController.showLiveItems;
|
||||
}),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
height: isTop ? 76 : 60,
|
||||
|
||||
Reference in New Issue
Block a user