diff --git a/lib/http/search.dart b/lib/http/search.dart index 3b580c68..9e2c6ee0 100644 --- a/lib/http/search.dart +++ b/lib/http/search.dart @@ -99,8 +99,8 @@ class SearchHttp { case SearchType.article: data = SearchArticleData.fromJson(res.data['data']); break; - default: - break; + // default: + // break; } return Success(data); } catch (err) { diff --git a/lib/pages/common/reply_controller.dart b/lib/pages/common/reply_controller.dart index c959f13a..b2c814be 100644 --- a/lib/pages/common/reply_controller.dart +++ b/lib/pages/common/reply_controller.dart @@ -111,6 +111,12 @@ abstract class ReplyController extends CommonListController { ReplyInfo? replyItem, int? replyType, }) { + if (loadingState.value case Error error) { + if (error.errMsg?.contains('关闭评论区') == true) { + SmartDialog.showToast(error.errMsg!); + return; + } + } assert(replyItem != null || (oid != null && replyType != null)); String? hint; try {