Revert "opt: non null (#1091)"

This reverts commit 3c34e43827.
This commit is contained in:
bggRGjQaUbCoE
2025-08-23 22:05:35 +08:00
parent b77403f03f
commit ee819bb260
75 changed files with 362 additions and 400 deletions

View File

@@ -36,7 +36,7 @@ class LiveDmBlockController extends GetxController
}
Future<void> queryData() async {
var res = await LiveHttp.getLiveInfoByUser(roomId!);
var res = await LiveHttp.getLiveInfoByUser(roomId);
if (res.isSuccess) {
ShieldInfo? data = res.data;
ShieldRules? shieldRules = data?.shieldRules;
@@ -115,7 +115,7 @@ class LiveDmBlockController extends GetxController
} else {
var res = await LiveHttp.liveShieldUser(
uid: value,
roomid: roomId!,
roomid: roomId,
type: 1,
);
if (res['status']) {
@@ -132,11 +132,11 @@ class LiveDmBlockController extends GetxController
}
}
Future<void> onRemove(int index, Object item) async {
Future<void> onRemove(int index, dynamic item) async {
if (item is ShieldUserList) {
var res = await LiveHttp.liveShieldUser(
uid: item.uid!,
roomid: roomId!,
uid: item.uid,
roomid: roomId,
type: 0,
);
if (res['status']) {
@@ -145,7 +145,7 @@ class LiveDmBlockController extends GetxController
SmartDialog.showToast(res['msg']);
}
} else {
var res = await LiveHttp.delShieldKeyword(keyword: item as String);
var res = await LiveHttp.delShieldKeyword(keyword: item);
if (res['status']) {
keywordList.removeAt(index);
} else {