mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-25 11:36:45 +08:00
tweaks (#1252)
* opt: cache * opt: MediaListPanel * feat: nested replyreply panel * tweaks * opt: abstract class * opt: PageStorageKey * opt: contextExt * opt: EpisodePanel * opt * opt: context instead GlobalKey * feat: jump to reply * refa: reply_reply * fix: jump * fix: index * update Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * opt: keepalive * reapply: nested replyreply * mod: spacing * opt: CommonSlidePageState * fix drag bottomsheet Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * opt reply jump Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * opt reply2reply Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * tweaks Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * tweaks Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * reapply: jumpToReply * fix: padding * fix: anim * fix some panels Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * opt: implements Scaffold * opt: remove keepalive * revert: GlobalKey * tweaks Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
b9a55ccbce
commit
37fb63c3b1
@@ -1,44 +0,0 @@
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:PiliPlus/pages/common/slide/common_slide_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
abstract class CommonCollapseSlidePage extends CommonSlidePage {
|
||||
const CommonCollapseSlidePage({super.key, super.enableSlide});
|
||||
}
|
||||
|
||||
abstract class CommonCollapseSlidePageState<T extends CommonCollapseSlidePage>
|
||||
extends CommonSlidePageState<T> {
|
||||
late bool isInit = true;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
init();
|
||||
}
|
||||
|
||||
void init() {
|
||||
if (Platform.isAndroid) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
isInit = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (Platform.isAndroid) {
|
||||
return Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
if (isInit)
|
||||
const CustomScrollView(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
),
|
||||
super.build(context),
|
||||
],
|
||||
);
|
||||
}
|
||||
return super.build(context);
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,7 @@ abstract class CommonSlidePage extends StatefulWidget {
|
||||
final bool enableSlide;
|
||||
}
|
||||
|
||||
abstract class CommonSlidePageState<T extends CommonSlidePage> extends State<T>
|
||||
with TickerProviderStateMixin {
|
||||
mixin CommonSlideMixin<T extends CommonSlidePage> on State<T>, TickerProvider {
|
||||
Offset? downPos;
|
||||
bool? isSliding;
|
||||
late double maxWidth;
|
||||
|
||||
Reference in New Issue
Block a user