Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-05-10 09:54:51 +08:00
parent cff6902e59
commit 4d748f95af
16 changed files with 511 additions and 666 deletions

View File

@@ -34,45 +34,6 @@ class MainActivity : AudioServiceActivity() {
when (call.method) {
"back" -> back();
"biliSendCommAntifraud" -> {
try {
val action = call.argument<Int>("action") ?: 0
val oid = call.argument<Number>("oid") ?: 0L
val type = call.argument<Int>("type") ?: 0
val rpid = call.argument<Number>("rpid") ?: 0L
val root = call.argument<Number>("root") ?: 0L
val parent = call.argument<Number>("parent") ?: 0L
val ctime = call.argument<Number>("ctime") ?: 0L
val commentText = call.argument<String>("comment_text") ?: ""
val pictures = call.argument<String?>("pictures")
val sourceId = call.argument<String>("source_id") ?: ""
val uid = call.argument<Number>("uid") ?: 0L
val cookies = call.argument<List<String>>("cookies") ?: emptyList<String>()
val intent = Intent().apply {
component = ComponentName(
"icu.freedomIntrovert.biliSendCommAntifraud",
"icu.freedomIntrovert.biliSendCommAntifraud.ByXposedLaunchedActivity"
)
putExtra("action", action)
putExtra("oid", oid.toLong())
putExtra("type", type)
putExtra("rpid", rpid.toLong())
putExtra("root", root.toLong())
putExtra("parent", parent.toLong())
putExtra("ctime", ctime.toLong())
putExtra("comment_text", commentText)
if (pictures != null)
putExtra("pictures", pictures)
putExtra("source_id", sourceId)
putExtra("uid", uid.toLong())
putStringArrayListExtra("cookies", ArrayList(cookies))
}
startActivity(intent)
} catch (_: Exception) {
}
}
"linkVerifySettings" -> {
val uri = ("package:" + context.packageName).toUri()
try {
@@ -131,15 +92,6 @@ class MainActivity : AudioServiceActivity() {
result.success(false)
}
"setPipAutoEnterEnabled" -> {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
val params = PictureInPictureParams.Builder()
.setAutoEnterEnabled(call.argument<Boolean>("autoEnable") ?: false)
.build()
setPictureInPictureParams(params)
}
}
"createShortcut" -> {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
try {
@@ -189,14 +141,6 @@ class MainActivity : AudioServiceActivity() {
startActivity(intent)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
window.attributes.layoutInDisplayCutoutMode =
LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
}
}
override fun onDestroy() {
stopService(Intent(this, com.ryanheise.audioservice.AudioService::class.java))
super.onDestroy()

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:PiliPlus/utils/global_data.dart';
import 'package:flutter/material.dart';
@@ -16,8 +15,7 @@ class DynamicCardSkeleton extends StatelessWidget {
alpha: 0.2,
),
);
return Skeleton(
child: Container(
return Container(
padding: const EdgeInsets.only(left: 12, right: 12, top: 12),
decoration: BoxDecoration(
border: Border(
@@ -109,7 +107,6 @@ class DynamicCardSkeleton extends StatelessWidget {
),
],
),
),
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:PiliPlus/common/style.dart';
import 'package:PiliPlus/common/widgets/flutter/layout_builder.dart';
import 'package:flutter/material.dart' hide LayoutBuilder;
@@ -9,8 +8,7 @@ class FavPgcItemSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: Padding(
return Padding(
padding: const EdgeInsets.symmetric(
horizontal: Style.safeSpace,
vertical: 5,
@@ -61,7 +59,6 @@ class FavPgcItemSkeleton extends StatelessWidget {
),
],
),
),
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:PiliPlus/common/style.dart';
import 'package:flutter/material.dart';
@@ -13,8 +12,7 @@ class _MediaPgcSkeletonState extends State<MediaPgcSkeleton> {
@override
Widget build(BuildContext context) {
Color bgColor = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: Padding(
return Padding(
padding: const .symmetric(
horizontal: Style.safeSpace,
vertical: 7,
@@ -76,7 +74,6 @@ class _MediaPgcSkeletonState extends State<MediaPgcSkeleton> {
),
],
),
),
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:flutter/material.dart';
class MsgFeedSysMsgSkeleton extends StatelessWidget {
@@ -7,8 +6,7 @@ class MsgFeedSysMsgSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: Padding(
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -47,7 +45,6 @@ class MsgFeedSysMsgSkeleton extends StatelessWidget {
),
],
),
),
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:flutter/material.dart';
class MsgFeedTopSkeleton extends StatelessWidget {
@@ -7,8 +6,7 @@ class MsgFeedTopSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: ListTile(
return ListTile(
leading: Container(
width: 45,
height: 45,
@@ -30,7 +28,6 @@ class MsgFeedTopSkeleton extends StatelessWidget {
width: 125,
height: 11,
),
),
);
}
}

View File

@@ -1,65 +0,0 @@
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
class Skeleton extends StatefulWidget {
final Widget child;
const Skeleton({super.key, required this.child});
@override
State<Skeleton> createState() => _SkeletonState();
}
class _SkeletonState extends State<Skeleton>
with SingleTickerProviderStateMixin {
late final AnimationController _controller;
late Color color;
final matrix = Matrix4.identity();
@override
void initState() {
super.initState();
_controller = AnimationController.unbounded(vsync: this)
..repeat(min: -0.5, max: 1.5, period: const Duration(milliseconds: 1000))
..addListener(_setState);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
void _setState() {
setState(() {});
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
color = ColorScheme.of(context).surface.withAlpha(10);
}
@override
Widget build(BuildContext context) {
final colors = [Colors.transparent, color, color, Colors.transparent];
return ShaderMask(
blendMode: BlendMode.srcATop,
shaderCallback: (Rect bounds) {
final width = bounds.width;
final height = bounds.height;
matrix[12] = width * _controller.value;
return ui.Gradient.linear(
Offset(0, 0.35 * height),
Offset(width, 0.95 * height),
colors,
const [0.1, 0.3, 0.5, 0.7],
TileMode.clamp,
matrix.storage,
);
},
child: widget.child,
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:PiliPlus/common/widgets/flutter/layout_builder.dart';
import 'package:PiliPlus/utils/utils.dart';
import 'package:flutter/material.dart' hide LayoutBuilder;
@@ -9,8 +8,7 @@ class SpaceOpusSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final surface = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: Card(
return Card(
clipBehavior: Clip.hardEdge,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(6)),
@@ -46,7 +44,6 @@ class SpaceOpusSkeleton extends StatelessWidget {
);
},
),
),
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:PiliPlus/common/style.dart';
import 'package:flutter/material.dart';
@@ -8,8 +7,7 @@ class VideoCardHSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: Padding(
return Padding(
padding: const .symmetric(
horizontal: Style.safeSpace,
vertical: 5,
@@ -71,7 +69,6 @@ class VideoCardHSkeleton extends StatelessWidget {
),
],
),
),
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:PiliPlus/common/style.dart';
import 'package:flutter/material.dart';
@@ -8,8 +7,7 @@ class VideoCardVSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: Column(
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AspectRatio(
@@ -58,7 +56,6 @@ class VideoCardVSkeleton extends StatelessWidget {
),
),
],
),
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:flutter/material.dart';
class VideoReplySkeleton extends StatelessWidget {
@@ -7,8 +6,7 @@ class VideoReplySkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
Color bgColor = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: Column(
return Column(
children: [
Padding(
padding: const EdgeInsets.fromLTRB(12, 8, 8, 2),
@@ -81,7 +79,6 @@ class VideoReplySkeleton extends StatelessWidget {
),
),
],
),
);
}
}

View File

@@ -1,4 +1,3 @@
import 'package:PiliPlus/common/skeleton/skeleton.dart';
import 'package:flutter/material.dart';
class WhisperItemSkeleton extends StatelessWidget {
@@ -7,8 +6,7 @@ class WhisperItemSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.onInverseSurface;
return Skeleton(
child: ListTile(
return ListTile(
leading: Container(
width: 45,
height: 45,
@@ -35,7 +33,6 @@ class WhisperItemSkeleton extends StatelessWidget {
width: 50,
height: 11,
),
),
);
}
}

View File

@@ -21,12 +21,10 @@ class VideoCardH extends StatelessWidget {
super.key,
required this.videoItem,
this.onTap,
this.onViewLater,
this.onRemove,
});
final HorizontalVideoModel videoItem;
final VoidCallback? onTap;
final ValueChanged<int>? onViewLater;
final VoidCallback? onRemove;
@override

View File

@@ -50,19 +50,17 @@ class _LivePageState extends State<LivePage>
Widget build(BuildContext context) {
super.build(context);
final ThemeData theme = Theme.of(context);
return Container(
clipBehavior: Clip.hardEdge,
margin: const EdgeInsets.symmetric(horizontal: Style.safeSpace),
decoration: const BoxDecoration(borderRadius: Style.mdRadius),
child: refreshIndicator(
return refreshIndicator(
onRefresh: controller.onRefresh,
child: CustomScrollView(
controller: controller.scrollController,
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
SliverPadding(
padding: const EdgeInsets.only(
padding: const .only(
left: Style.cardSpace,
top: Style.cardSpace,
right: Style.cardSpace,
bottom: 100,
),
sliver: SliverMainAxisGroup(
@@ -74,7 +72,6 @@ class _LivePageState extends State<LivePage>
),
],
),
),
);
}

View File

@@ -29,25 +29,25 @@ class _RcmdPageState extends State<RcmdPage>
Widget build(BuildContext context) {
super.build(context);
final colorScheme = ColorScheme.of(context);
return Container(
clipBehavior: .hardEdge,
margin: const .symmetric(horizontal: Style.safeSpace),
decoration: const BoxDecoration(borderRadius: Style.mdRadius),
child: refreshIndicator(
return refreshIndicator(
onRefresh: controller.onRefresh,
child: CustomScrollView(
controller: controller.scrollController,
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
SliverPadding(
padding: const .only(top: Style.cardSpace, bottom: 100),
padding: const .only(
left: Style.safeSpace,
top: Style.cardSpace,
right: Style.safeSpace,
bottom: 100,
),
sliver: Obx(
() => _buildBody(colorScheme, controller.loadingState.value),
),
),
],
),
),
);
}

View File

@@ -291,6 +291,7 @@ class ReplyItemGrpc extends StatelessWidget {
padding: padding,
child: custom_text.Text.rich(
primary: theme.colorScheme.primary,
maxLines: replyLevel == 1 ? 6 : null,
style: TextStyle(
height: 1.75,
fontSize: theme.textTheme.bodyMedium!.fontSize,