check reply state

Closes #990

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-11 14:06:33 +08:00
parent 95f1d1485d
commit 4a4aa569ec
2 changed files with 8 additions and 2 deletions

View File

@@ -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) {

View File

@@ -111,6 +111,12 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
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 {