Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-16 22:43:57 +08:00
parent 55733d30c5
commit 5420712bda
15 changed files with 40 additions and 30 deletions

View File

@@ -30,6 +30,12 @@ android {
versionName = flutter.versionName versionName = flutter.versionName
} }
packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}
val keyProperties = Properties().also { val keyProperties = Properties().also {
val properties = rootProject.file("key.properties") val properties = rootProject.file("key.properties")
if (properties.exists()) if (properties.exists())
@@ -51,12 +57,12 @@ android {
all { all {
signingConfig = config ?: signingConfigs["debug"] signingConfig = config ?: signingConfigs["debug"]
} }
release { // release {
proguardFiles( // proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), // getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro" // "proguard-rules.pro"
) // )
} // }
debug { debug {
applicationIdSuffix = ".debug" applicationIdSuffix = ".debug"
} }

View File

@@ -0,0 +1,3 @@
<resources>
<string name="app_name">PiliPlus debug</string>
</resources>

View File

@@ -36,11 +36,11 @@
</queries> </queries>
<application <application
android:label="PiliPlus" android:label="@string/app_name"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:enableOnBackInvokedCallback="true" android:enableOnBackInvokedCallback="false"
android:allowBackup="false" android:allowBackup="false"
android:fullBackupContent="false" android:fullBackupContent="false"
tools:replace="android:allowBackup"> tools:replace="android:allowBackup">

View File

@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="Ucrop.CropTheme" parent="Theme.AppCompat.Light.NoActionBar"> <style name="Ucrop.CropTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item> <item name="android:windowLightStatusBar">true</item>
</style> <item name="android:fitsSystemWindows">true</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>
</resources> </resources>

View File

@@ -0,0 +1,3 @@
<resources>
<string name="app_name">PiliPlus</string>
</resources>

View File

@@ -1,3 +1,5 @@
import 'dart:io' show Platform;
import 'package:PiliPlus/pages/common/slide/common_slide_page.dart'; import 'package:PiliPlus/pages/common/slide/common_slide_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -16,24 +18,27 @@ abstract class CommonCollapseSlidePageState<T extends CommonCollapseSlidePage>
} }
void init() { void init() {
WidgetsBinding.instance.addPostFrameCallback((_) { if (Platform.isAndroid) {
isInit = false; WidgetsBinding.instance.addPostFrameCallback((_) {
}); isInit = false;
});
}
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Widget child = super.build(context); if (Platform.isAndroid) {
if (isInit) {
return Stack( return Stack(
clipBehavior: Clip.none,
children: [ children: [
const CustomScrollView( if (isInit)
physics: NeverScrollableScrollPhysics(), const CustomScrollView(
), physics: NeverScrollableScrollPhysics(),
child, ),
super.build(context),
], ],
); );
} }
return child; return super.build(context);
} }
} }

View File

@@ -62,7 +62,6 @@ class _VotePanelState extends State<VotePanel> {
), ),
Flexible( Flexible(
child: ListView.builder( child: ListView.builder(
key: const PageStorageKey('vote_opions'),
shrinkWrap: true, shrinkWrap: true,
itemCount: _voteInfo.options.length, itemCount: _voteInfo.options.length,
itemBuilder: (context, index) => _buildOptions(index), itemBuilder: (context, index) => _buildOptions(index),

View File

@@ -261,7 +261,6 @@ class _EpisodePanelState extends CommonCollapseSlidePageState<EpisodePanel> {
final isCurrTab = tabIndex == widget.initialTabIndex; final isCurrTab = tabIndex == widget.initialTabIndex;
return KeepAliveWrapper( return KeepAliveWrapper(
builder: (context) => ScrollablePositionedList.separated( builder: (context) => ScrollablePositionedList.separated(
key: PageStorageKey(tabIndex),
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 7, top: 7,
bottom: MediaQuery.paddingOf(context).bottom + 80, bottom: MediaQuery.paddingOf(context).bottom + 80,

View File

@@ -56,7 +56,6 @@ class _PgcReviewChildPageState extends State<PgcReviewChildPage>
return refreshIndicator( return refreshIndicator(
onRefresh: _controller.onRefresh, onRefresh: _controller.onRefresh,
child: CustomScrollView( child: CustomScrollView(
key: PageStorageKey(_tag),
controller: _controller.scrollController, controller: _controller.scrollController,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
slivers: [ slivers: [

View File

@@ -61,7 +61,6 @@ class _AiDetailState extends CommonCollapseSlidePageState<AiConclusionPanel> {
@override @override
Widget buildList(ThemeData theme) { Widget buildList(ThemeData theme) {
return CustomScrollView( return CustomScrollView(
key: const PageStorageKey('ai_detail'),
controller: _controller, controller: _controller,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
slivers: [ slivers: [

View File

@@ -99,7 +99,6 @@ class _IntroDetailState extends CommonCollapseSlidePageState<PgcIntroPanel> {
); );
return SelectionArea( return SelectionArea(
child: ListView( child: ListView(
key: const PageStorageKey('pgc_intro'),
controller: _controller, controller: _controller,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
padding: EdgeInsets.only( padding: EdgeInsets.only(

View File

@@ -136,7 +136,6 @@ class _PagesPanelState extends State<PagesPanel> {
SizedBox( SizedBox(
height: 35, height: 35,
child: ListView.builder( child: ListView.builder(
key: PageStorageKey(hashCode),
controller: _scrollController, controller: _scrollController,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemCount: pages.length, itemCount: pages.length,

View File

@@ -122,7 +122,6 @@ class _MediaListPanelState
() { () {
final showDelBtn = widget.onDelete != null && widget.mediaList.length > 1; final showDelBtn = widget.onDelete != null && widget.mediaList.length > 1;
return ScrollablePositionedList.separated( return ScrollablePositionedList.separated(
key: const PageStorageKey('medialist'),
itemScrollController: _controller, itemScrollController: _controller,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
itemCount: widget.mediaList.length, itemCount: widget.mediaList.length,

View File

@@ -112,7 +112,6 @@ class _PostPanelState extends CommonCollapseSlidePageState<PostPanel> {
clipBehavior: Clip.none, clipBehavior: Clip.none,
children: [ children: [
SingleChildScrollView( SingleChildScrollView(
key: const PageStorageKey('segment_list'),
controller: _controller, controller: _controller,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 88 + bottom), padding: EdgeInsets.only(bottom: 88 + bottom),

View File

@@ -96,7 +96,6 @@ class _ViewPointsPageState
@override @override
Widget buildList(ThemeData theme) { Widget buildList(ThemeData theme) {
return ListView.builder( return ListView.builder(
key: const PageStorageKey('viewpoint'),
controller: _controller, controller: _controller,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
padding: EdgeInsets.only( padding: EdgeInsets.only(