mod: tmply disable grpc reply

Closes #114

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-07 12:00:11 +08:00
parent da3c087ade
commit a0afbb2615
5 changed files with 89 additions and 1 deletions

View File

@@ -295,6 +295,26 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
Error() => HttpError(
errMsg: loadingState.errMsg,
callback: _videoReplyController.onReload,
extraWidget: GlobalData().grpcReply
? FilledButton.tonal(
onPressed: () {
GlobalData().grpcReply = false;
},
style: ButtonStyle(
backgroundColor: WidgetStateProperty.resolveWith((states) {
return Theme.of(context)
.colorScheme
.primary
.withAlpha(20);
}),
),
child: Text(
'暂时关闭gRPC加载评论',
style:
TextStyle(color: Theme.of(context).colorScheme.primary),
),
)
: null,
),
LoadingState() => throw UnimplementedError(),
};

View File

@@ -394,6 +394,27 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
HttpError(
errMsg: loadingState.errMsg,
callback: _videoReplyReplyController.onReload,
extraWidget: GlobalData().grpcReply
? FilledButton.tonal(
onPressed: () {
GlobalData().grpcReply = false;
},
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.resolveWith((states) {
return Theme.of(context)
.colorScheme
.primary
.withAlpha(20);
}),
),
child: Text(
'暂时关闭gRPC加载评论',
style: TextStyle(
color: Theme.of(context).colorScheme.primary),
),
)
: null,
)
],
),