mod
This commit is contained in:
@ -33,23 +33,17 @@ class VideoReplyController extends GetxController {
|
||||
|
||||
Future queryReplyList({type = 'init'}) async {
|
||||
isLoadingMore = true;
|
||||
var res = replyLevel == '1'
|
||||
? await ReplyHttp.replyList(
|
||||
oid: aid!,
|
||||
pageNum: ++currentPage,
|
||||
type: ReplyType.video.index,
|
||||
sort: sortType.index,
|
||||
)
|
||||
: await ReplyHttp.replyReplyList(
|
||||
oid: aid!,
|
||||
root: rpid!,
|
||||
pageNum: ++currentPage,
|
||||
type: ReplyType.video.index,
|
||||
);
|
||||
var res = await ReplyHttp.replyList(
|
||||
oid: aid!,
|
||||
pageNum: currentPage + 1,
|
||||
type: ReplyType.video.index,
|
||||
sort: sortType.index,
|
||||
);
|
||||
if (res['status']) {
|
||||
List<ReplyItemModel> replies = res['data'].replies;
|
||||
if (replies.isNotEmpty) {
|
||||
noMore.value = '加载中';
|
||||
currentPage++;
|
||||
noMore.value = '加载中...';
|
||||
if (replyList.length == res['data'].page.acount) {
|
||||
noMore.value = '没有更多了';
|
||||
}
|
||||
|
||||
@ -167,10 +167,10 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
child: TextButton.icon(
|
||||
onPressed: () =>
|
||||
_videoReplyController.queryBySort(),
|
||||
icon: const Icon(Icons.sort, size: 15),
|
||||
icon: const Icon(Icons.sort, size: 16),
|
||||
label: Obx(() => Text(
|
||||
_videoReplyController.sortTypeLabel.value,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
style: const TextStyle(fontSize: 13),
|
||||
)),
|
||||
),
|
||||
)
|
||||
@ -207,9 +207,18 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
EdgeInsets.only(bottom: bottom),
|
||||
height: bottom + 100,
|
||||
child: Center(
|
||||
child: Obx(() => Text(
|
||||
child: Obx(
|
||||
() => Text(
|
||||
_videoReplyController
|
||||
.noMore.value)),
|
||||
.noMore.value,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.outline,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
||||
@ -187,7 +187,9 @@ class ReplyItem extends StatelessWidget {
|
||||
TextSpan(
|
||||
children: [
|
||||
if (replyItem!.isTop!)
|
||||
const WidgetSpan(child: UpTag(tagText: 'TOP')),
|
||||
const WidgetSpan(
|
||||
alignment: PlaceholderAlignment.top,
|
||||
child: UpTag(tagText: 'TOP')),
|
||||
buildContent(context, replyItem!, replyReply, null),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user