mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: reply error widget
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -297,13 +297,11 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
errMsg: '还没有评论',
|
||||
callback: _videoReplyController.onReload,
|
||||
),
|
||||
Error() => HttpError(
|
||||
errMsg: loadingState.errMsg,
|
||||
callback: _videoReplyController.onReload,
|
||||
extraWidget: loadingState.errMsg.startsWith('gRPC Error') &&
|
||||
GlobalData().grpcReply
|
||||
? grpcReplyErrorWidget(context, _videoReplyController.onReload)
|
||||
: null,
|
||||
Error() => replyErrorWidget(
|
||||
context,
|
||||
true,
|
||||
loadingState.errMsg,
|
||||
_videoReplyController.onReload,
|
||||
),
|
||||
LoadingState() => throw UnimplementedError(),
|
||||
};
|
||||
|
||||
@@ -13,7 +13,6 @@ import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:PiliPlus/common/skeleton/video_reply.dart';
|
||||
import 'package:PiliPlus/common/widgets/http_error.dart';
|
||||
import 'package:PiliPlus/models/common/reply_type.dart';
|
||||
import 'package:get/get_navigation/src/dialog/dialog_route.dart';
|
||||
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
|
||||
@@ -412,22 +411,11 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
|
||||
: _replyItem(loadingState.response[index], index);
|
||||
}
|
||||
}(),
|
||||
Error() => CustomScrollView(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
HttpError(
|
||||
errMsg: loadingState.errMsg,
|
||||
callback: _videoReplyReplyController.onReload,
|
||||
extraWidget: loadingState.errMsg.startsWith('gRPC Error') &&
|
||||
GlobalData().grpcReply
|
||||
? grpcReplyErrorWidget(
|
||||
context,
|
||||
_videoReplyReplyController.onReload,
|
||||
)
|
||||
: null,
|
||||
)
|
||||
],
|
||||
Error() => replyErrorWidget(
|
||||
context,
|
||||
false,
|
||||
loadingState.errMsg,
|
||||
_videoReplyReplyController.onReload,
|
||||
),
|
||||
LoadingState() => throw UnimplementedError(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user