fix: delete article

This commit is contained in:
bggRGjQaUbCoE
2024-10-04 18:48:57 +08:00
parent 71681e3592
commit d850e891a0
2 changed files with 8 additions and 8 deletions

View File

@@ -146,13 +146,13 @@ class HistoryController extends GetxController {
void _onDelete(List<HisListItem> result) async {
SmartDialog.showLoading(msg: '请求中');
List kidList = result.map((item) {
String tag = 'archive';
if (item.history?.business == 'live') {
tag = 'live';
} else if (item.history?.business?.contains('article') == true) {
tag = 'article';
}
return '${tag}_${item.kid}';
// String tag = 'archive';
// if (item.history?.business == 'live') {
// tag = 'live';
// } else if (item.history?.business?.contains('article') == true) {
// tag = 'article-list';
// }
return '${item.history?.business}_${item.kid}';
}).toList();
dynamic response = await UserHttp.delHistory(kidList);
if (response['status']) {

View File

@@ -157,7 +157,6 @@ class _WhisperDetailPageState extends State<WhisperDetailPage> {
onRefresh: _whisperDetailController.querySessionMsg,
child: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.zero,
reverse: true,
itemCount: messageList.length,
itemBuilder: (_, int i) {
@@ -166,6 +165,7 @@ class _WhisperDetailPageState extends State<WhisperDetailPage> {
e_infos: _whisperDetailController.eInfos,
);
},
padding: const EdgeInsets.only(bottom: 20),
),
);
},