mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +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 {
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'package:PiliPlus/grpc/bilibili/app/im/v1.pbenum.dart'
|
||||
show IMSettingType;
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models/common/image_type.dart';
|
||||
import 'package:PiliPlus/models/msg/msgfeed_reply_me.dart';
|
||||
import 'package:PiliPlus/models_new/msg/msg_reply/item.dart';
|
||||
import 'package:PiliPlus/pages/msg_feed_top/reply_me/controller.dart';
|
||||
import 'package:PiliPlus/pages/whisper_settings/view.dart';
|
||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||
@@ -64,7 +64,7 @@ class _ReplyMePageState extends State<ReplyMePage> {
|
||||
}
|
||||
|
||||
Widget _buildBody(
|
||||
ThemeData theme, LoadingState<List<ReplyMeItems>?> loadingState) {
|
||||
ThemeData theme, LoadingState<List<MsgReplyItem>?> loadingState) {
|
||||
return switch (loadingState) {
|
||||
Loading() => SliverList.builder(
|
||||
itemCount: 12,
|
||||
@@ -80,7 +80,7 @@ class _ReplyMePageState extends State<ReplyMePage> {
|
||||
_replyMeController.onLoadMore();
|
||||
}
|
||||
|
||||
ReplyMeItems item = response[index];
|
||||
MsgReplyItem item = response[index];
|
||||
return ListTile(
|
||||
onTap: () {
|
||||
String? nativeUri = item.item?.nativeUri;
|
||||
|
||||
Reference in New Issue
Block a user