mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 私信已读状态更新+补充部分api
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pilipala/http/msg.dart';
|
||||
import 'package:pilipala/models/msg/session.dart';
|
||||
@@ -25,4 +26,19 @@ class WhisperDetailController extends GetxController {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Future ackSessionMsg() async {
|
||||
if (messageList.isEmpty){
|
||||
return;
|
||||
}
|
||||
var res = await MsgHttp.ackSessionMsg(
|
||||
talkerId: talkerId,
|
||||
ackSeqno: messageList.last.msgSeqno,
|
||||
);
|
||||
if (res['status']) {
|
||||
SmartDialog.showToast("已读成功");
|
||||
} else {
|
||||
SmartDialog.showToast(res['msg']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user