mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-25 03:26:22 +08:00
opt: use cascade (#812)
This commit is contained in:
committed by
GitHub
parent
877732e1e7
commit
6f69a45195
@@ -30,8 +30,7 @@ class FavArticleController extends CommonListController {
|
||||
Future<void> onRemove(index, id) async {
|
||||
final res = await UserHttp.communityAction(opusId: id, action: 4);
|
||||
if (res['status']) {
|
||||
List list = (loadingState.value as Success).response;
|
||||
list.removeAt(index);
|
||||
loadingState.value.data!.removeAt(index);
|
||||
loadingState.refresh();
|
||||
SmartDialog.showToast('已取消收藏');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user