mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 12:07:11 +08:00
@@ -1,11 +1,12 @@
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/http/msg.dart';
|
||||
import 'package:PiliPlus/models/msg/msgfeed_reply_me.dart';
|
||||
import 'package:PiliPlus/models_new/msg/msg_reply/data.dart';
|
||||
import 'package:PiliPlus/models_new/msg/msg_reply/item.dart';
|
||||
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
|
||||
class ReplyMeController
|
||||
extends CommonListController<MsgFeedReplyMe, ReplyMeItems> {
|
||||
extends CommonListController<MsgReplyData, MsgReplyItem> {
|
||||
int? cursor;
|
||||
int? cursorTime;
|
||||
|
||||
@@ -16,19 +17,13 @@ class ReplyMeController
|
||||
}
|
||||
|
||||
@override
|
||||
List<ReplyMeItems>? getDataList(MsgFeedReplyMe response) {
|
||||
return response.items;
|
||||
}
|
||||
|
||||
@override
|
||||
bool customHandleResponse(bool isRefresh, Success<MsgFeedReplyMe> response) {
|
||||
final data = response.response;
|
||||
if (data.cursor?.isEnd == true) {
|
||||
List<MsgReplyItem>? getDataList(MsgReplyData response) {
|
||||
if (response.cursor?.isEnd == true) {
|
||||
isEnd = true;
|
||||
}
|
||||
cursor = data.cursor?.id;
|
||||
cursorTime = data.cursor?.time;
|
||||
return false;
|
||||
cursor = response.cursor?.id;
|
||||
cursorTime = response.cursor?.time;
|
||||
return response.items;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -39,7 +34,7 @@ class ReplyMeController
|
||||
}
|
||||
|
||||
@override
|
||||
Future<LoadingState<MsgFeedReplyMe>> customGetData() =>
|
||||
Future<LoadingState<MsgReplyData>> customGetData() =>
|
||||
MsgHttp.msgFeedReplyMe(cursor: cursor, cursorTime: cursorTime);
|
||||
|
||||
Future<void> onRemove(dynamic id, int index) async {
|
||||
|
||||
Reference in New Issue
Block a user