mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-01 23:59:50 +08:00
fix: video theme, view later
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -21,6 +21,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
required this.dialog,
|
||||
required this.replyType,
|
||||
required this.isDialogue,
|
||||
required this.getThemeData,
|
||||
});
|
||||
final int? dialog;
|
||||
final bool isDialogue;
|
||||
@@ -60,6 +61,8 @@ class VideoReplyReplyController extends ReplyController
|
||||
return super.onRefresh();
|
||||
}
|
||||
|
||||
final ThemeData Function() getThemeData;
|
||||
|
||||
@override
|
||||
bool customHandleResponse(Success response) {
|
||||
if (GlobalData().grpcReply) {
|
||||
@@ -81,8 +84,8 @@ class VideoReplyReplyController extends ReplyController
|
||||
vsync: this,
|
||||
);
|
||||
colorAnimation = ColorTween(
|
||||
begin: Theme.of(Get.context!).colorScheme.onInverseSurface,
|
||||
end: Theme.of(Get.context!).colorScheme.surface,
|
||||
begin: getThemeData().colorScheme.onInverseSurface,
|
||||
end: getThemeData().colorScheme.surface,
|
||||
).animate(controller!);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
if (index != null) {
|
||||
|
||||
@@ -80,6 +80,7 @@ class _VideoReplyReplyPanelState
|
||||
dialog: widget.dialog,
|
||||
replyType: widget.replyType,
|
||||
isDialogue: widget.isDialogue,
|
||||
getThemeData: () => Theme.of(context),
|
||||
),
|
||||
tag: '${widget.rpid}${widget.dialog}${widget.isDialogue}',
|
||||
);
|
||||
@@ -473,9 +474,9 @@ class _VideoReplyReplyPanelState
|
||||
animation: _videoReplyReplyController.colorAnimation!,
|
||||
builder: (context, child) {
|
||||
return ColoredBox(
|
||||
color: _videoReplyReplyController
|
||||
.colorAnimation?.value ??
|
||||
Theme.of(Get.context!).colorScheme.onInverseSurface,
|
||||
color:
|
||||
_videoReplyReplyController.colorAnimation?.value ??
|
||||
Theme.of(context).colorScheme.onInverseSurface,
|
||||
child: _replyItem(loadingState.response[index], index),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user