Merge branch 'fix'
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
import 'package:easy_debounce/easy_throttle.dart';
|
import 'package:easy_debounce/easy_throttle.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
import 'package:pilipala/http/reply.dart';
|
import 'package:pilipala/http/reply.dart';
|
||||||
@ -15,7 +14,6 @@ class VideoReplyController extends GetxController {
|
|||||||
this.rpid,
|
this.rpid,
|
||||||
this.replyLevel,
|
this.replyLevel,
|
||||||
);
|
);
|
||||||
final ScrollController scrollController = ScrollController();
|
|
||||||
// 视频aid 请求时使用的oid
|
// 视频aid 请求时使用的oid
|
||||||
int? aid;
|
int? aid;
|
||||||
// 层级 2为楼中楼
|
// 层级 2为楼中楼
|
||||||
|
|||||||
@ -67,13 +67,12 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
vsync: this, duration: const Duration(milliseconds: 300));
|
vsync: this, duration: const Duration(milliseconds: 300));
|
||||||
|
|
||||||
_futureBuilderFuture = _videoReplyController.queryReplyList();
|
_futureBuilderFuture = _videoReplyController.queryReplyList();
|
||||||
|
scrollController = ScrollController();
|
||||||
fabAnimationCtr.forward();
|
fabAnimationCtr.forward();
|
||||||
scrollListener();
|
scrollListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
void scrollListener() {
|
void scrollListener() {
|
||||||
scrollController = _videoReplyController.scrollController;
|
|
||||||
scrollController.addListener(
|
scrollController.addListener(
|
||||||
() {
|
() {
|
||||||
if (scrollController.position.pixels >=
|
if (scrollController.position.pixels >=
|
||||||
@ -185,7 +184,8 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
builder: (BuildContext context, snapshot) {
|
builder: (BuildContext context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
var data = snapshot.data;
|
var data = snapshot.data;
|
||||||
if (data['status']) {
|
if (_videoReplyController.replyList.isNotEmpty ||
|
||||||
|
(data && data['status'])) {
|
||||||
// 请求成功
|
// 请求成功
|
||||||
return Obx(
|
return Obx(
|
||||||
() => _videoReplyController.isLoadingMore &&
|
() => _videoReplyController.isLoadingMore &&
|
||||||
|
|||||||
@ -935,7 +935,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
begin: 0.0,
|
begin: 0.0,
|
||||||
end: _hideSeekBackwardButton.value ? 0.0 : 1.0,
|
end: _hideSeekBackwardButton.value ? 0.0 : 1.0,
|
||||||
),
|
),
|
||||||
duration: const Duration(milliseconds: 500),
|
duration: const Duration(milliseconds: 200),
|
||||||
builder: (BuildContext context, double value,
|
builder: (BuildContext context, double value,
|
||||||
Widget? child) =>
|
Widget? child) =>
|
||||||
Opacity(
|
Opacity(
|
||||||
@ -978,7 +978,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
begin: 0.0,
|
begin: 0.0,
|
||||||
end: _hideSeekForwardButton.value ? 0.0 : 1.0,
|
end: _hideSeekForwardButton.value ? 0.0 : 1.0,
|
||||||
),
|
),
|
||||||
duration: const Duration(milliseconds: 500),
|
duration: const Duration(milliseconds: 200),
|
||||||
builder: (BuildContext context, double value,
|
builder: (BuildContext context, double value,
|
||||||
Widget? child) =>
|
Widget? child) =>
|
||||||
Opacity(
|
Opacity(
|
||||||
|
|||||||
@ -20,6 +20,13 @@ class BackwardSeekIndicatorState extends State<BackwardSeekIndicator> {
|
|||||||
|
|
||||||
Timer? timer;
|
Timer? timer;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void setState(VoidCallback fn) {
|
||||||
|
if (mounted) {
|
||||||
|
super.setState(fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|||||||
@ -20,6 +20,13 @@ class ForwardSeekIndicatorState extends State<ForwardSeekIndicator> {
|
|||||||
|
|
||||||
Timer? timer;
|
Timer? timer;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void setState(VoidCallback fn) {
|
||||||
|
if (mounted) {
|
||||||
|
super.setState(fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|||||||
Reference in New Issue
Block a user