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 { void _onDelete(List<HisListItem> result) async {
SmartDialog.showLoading(msg: '请求中'); SmartDialog.showLoading(msg: '请求中');
List kidList = result.map((item) { List kidList = result.map((item) {
String tag = 'archive'; // String tag = 'archive';
if (item.history?.business == 'live') { // if (item.history?.business == 'live') {
tag = 'live'; // tag = 'live';
} else if (item.history?.business?.contains('article') == true) { // } else if (item.history?.business?.contains('article') == true) {
tag = 'article'; // tag = 'article-list';
} // }
return '${tag}_${item.kid}'; return '${item.history?.business}_${item.kid}';
}).toList(); }).toList();
dynamic response = await UserHttp.delHistory(kidList); dynamic response = await UserHttp.delHistory(kidList);
if (response['status']) { if (response['status']) {

View File

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