mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 12:10:33 +08:00
@@ -36,7 +36,7 @@ class AtMeController extends CommonListController<MsgAtData, MsgAtItem> {
|
||||
Future<LoadingState<MsgAtData>> customGetData() =>
|
||||
MsgHttp.msgFeedAtMe(cursor: cursor, cursorTime: cursorTime);
|
||||
|
||||
Future<void> onRemove(Object id, int index) async {
|
||||
Future<void> onRemove(dynamic id, int index) async {
|
||||
try {
|
||||
var res = await MsgHttp.delMsgfeed(2, id);
|
||||
if (res['status']) {
|
||||
|
||||
@@ -104,8 +104,7 @@ class _AtMePageState extends State<AtMePage> {
|
||||
onLongPress: () => showConfirmDialog(
|
||||
context: context,
|
||||
title: '确定删除该通知?',
|
||||
onConfirm: () =>
|
||||
_atMeController.onRemove(item.id!, index),
|
||||
onConfirm: () => _atMeController.onRemove(item.id, index),
|
||||
),
|
||||
leading: GestureDetector(
|
||||
onTap: () => Get.toNamed('/member?mid=${item.user?.mid}'),
|
||||
|
||||
@@ -31,7 +31,7 @@ class LikeDetailController
|
||||
@override
|
||||
Future<LoadingState<MsgLikeDetailData>> customGetData() =>
|
||||
MsgHttp.msgLikeDetail(
|
||||
cardId: cardId!,
|
||||
cardId: cardId,
|
||||
pn: page,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class LikeMeController
|
||||
Future<LoadingState<MsgLikeData>> customGetData() =>
|
||||
MsgHttp.msgFeedLikeMe(cursor: cursor, cursorTime: cursorTime);
|
||||
|
||||
Future<void> onRemove(Object id, int index, bool isLatest) async {
|
||||
Future<void> onRemove(dynamic id, int index, bool isLatest) async {
|
||||
try {
|
||||
var res = await MsgHttp.delMsgfeed(0, id);
|
||||
if (res['status']) {
|
||||
@@ -84,10 +84,7 @@ 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,
|
||||
|
||||
@@ -37,7 +37,7 @@ class ReplyMeController
|
||||
Future<LoadingState<MsgReplyData>> customGetData() =>
|
||||
MsgHttp.msgFeedReplyMe(cursor: cursor, cursorTime: cursorTime);
|
||||
|
||||
Future<void> onRemove(Object id, int index) async {
|
||||
Future<void> onRemove(dynamic id, int index) async {
|
||||
try {
|
||||
var res = await MsgHttp.delMsgfeed(1, id);
|
||||
if (res['status']) {
|
||||
|
||||
@@ -110,7 +110,7 @@ class _ReplyMePageState extends State<ReplyMePage> {
|
||||
context: context,
|
||||
title: '确定删除该通知?',
|
||||
onConfirm: () =>
|
||||
_replyMeController.onRemove(item.id!, index),
|
||||
_replyMeController.onRemove(item.id, index),
|
||||
),
|
||||
leading: GestureDetector(
|
||||
onTap: () => Get.toNamed('/member?mid=${item.user?.mid}'),
|
||||
|
||||
@@ -34,7 +34,7 @@ class SysMsgController
|
||||
return super.onRefresh();
|
||||
}
|
||||
|
||||
Future<void> onRemove(Object id, int index) async {
|
||||
Future<void> onRemove(dynamic id, int index) async {
|
||||
try {
|
||||
var res = await MsgHttp.delSysMsg(id);
|
||||
if (res['status']) {
|
||||
|
||||
@@ -83,7 +83,7 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
||||
context: context,
|
||||
title: '确定删除该通知?',
|
||||
onConfirm: () =>
|
||||
_sysMsgController.onRemove(item.id!, index),
|
||||
_sysMsgController.onRemove(item.id, index),
|
||||
),
|
||||
title: Text(
|
||||
"${item.title}",
|
||||
|
||||
Reference in New Issue
Block a user