mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
committed by
GitHub
parent
6009668427
commit
3c34e43827
@@ -63,7 +63,7 @@ class LikeMeController
|
||||
Future<LoadingState<MsgLikeData>> customGetData() =>
|
||||
MsgHttp.msgFeedLikeMe(cursor: cursor, cursorTime: cursorTime);
|
||||
|
||||
Future<void> onRemove(dynamic id, int index, bool isLatest) async {
|
||||
Future<void> onRemove(Object id, int index, bool isLatest) async {
|
||||
try {
|
||||
var res = await MsgHttp.delMsgfeed(0, id);
|
||||
if (res['status']) {
|
||||
@@ -84,7 +84,10 @@ class LikeMeController
|
||||
|
||||
Future<void> onSetNotice(MsgLikeItem item, bool isNotice) async {
|
||||
int noticeState = isNotice ? 1 : 0;
|
||||
var res = await MsgHttp.msgSetNotice(id: item.id, noticeState: noticeState);
|
||||
var res = await MsgHttp.msgSetNotice(
|
||||
id: item.id!,
|
||||
noticeState: noticeState,
|
||||
);
|
||||
if (res['status']) {
|
||||
item.noticeState = noticeState;
|
||||
loadingState.refresh();
|
||||
|
||||
@@ -160,7 +160,7 @@ class _LikeMePageState extends State<LikeMePage> {
|
||||
Widget _buildItem(
|
||||
ThemeData theme,
|
||||
MsgLikeItem item,
|
||||
ValueChanged<int?> onRemove,
|
||||
ValueChanged<int> onRemove,
|
||||
) {
|
||||
return ListTile(
|
||||
onTap: () {
|
||||
@@ -199,7 +199,7 @@ class _LikeMePageState extends State<LikeMePage> {
|
||||
context: context,
|
||||
title: '删除',
|
||||
content: '该条通知删除后,当有新点赞时会重新出现在列表,是否继续?',
|
||||
onConfirm: () => onRemove(item.id),
|
||||
onConfirm: () => onRemove(item.id!),
|
||||
);
|
||||
},
|
||||
dense: true,
|
||||
|
||||
Reference in New Issue
Block a user