mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-28 05:10:14 +08:00
tweak
This commit is contained in:
@@ -145,7 +145,7 @@ class DetailItem extends StatelessWidget {
|
||||
final curDownload = downloadService.curDownload.value;
|
||||
if (curDownload != null &&
|
||||
curDownload.cid == cid &&
|
||||
curDownload.status!.index <= 3) {
|
||||
curDownload.status.isDownloading) {
|
||||
downloadService.cancelDownload(
|
||||
isDelete: false,
|
||||
downloadNext: false,
|
||||
@@ -352,7 +352,7 @@ class DetailItem extends StatelessWidget {
|
||||
? theme.colorScheme.primary
|
||||
: theme.colorScheme.outline;
|
||||
return progressWidget(
|
||||
statusMsg: status!.message,
|
||||
statusMsg: status.message,
|
||||
progressStr:
|
||||
status ==
|
||||
DownloadStatus
|
||||
@@ -385,7 +385,7 @@ class DetailItem extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget entryProgress(ThemeData theme) => progressWidget(
|
||||
statusMsg: entry.status?.message ?? '暂停中',
|
||||
statusMsg: entry.status.message,
|
||||
progressStr: entry.totalBytes == 0
|
||||
? ''
|
||||
: '${CacheManager.formatSize(entry.downloadedBytes)}/${CacheManager.formatSize(entry.totalBytes)}',
|
||||
|
||||
@@ -126,8 +126,8 @@ class MineController extends CommonDataController<FavFolderData, FavFolderData>
|
||||
|
||||
Future<void> queryUserStatOwner() async {
|
||||
final res = await UserHttp.userStatOwner();
|
||||
if (res['status']) {
|
||||
userStat.value = res['data'];
|
||||
if (res case Success(:final response)) {
|
||||
userStat.value = response;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -402,7 +402,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
|
||||
@override
|
||||
// 返回当前页面时
|
||||
Future<void> didPopNext() async {
|
||||
void didPopNext() {
|
||||
if (videoDetailController.imageview) {
|
||||
videoDetailController.imageview = false;
|
||||
return;
|
||||
@@ -442,20 +442,24 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
ScreenBrightnessPlatform.instance.resetApplicationScreenBrightness();
|
||||
}
|
||||
}
|
||||
super.didPopNext();
|
||||
if (videoDetailController.autoPlay.value) {
|
||||
await videoDetailController.playerInit(
|
||||
autoplay: videoDetailController.playerStatus == PlayerStatus.playing,
|
||||
);
|
||||
} else if (videoDetailController.plPlayerController.preInitPlayer &&
|
||||
!videoDetailController.isQuerying &&
|
||||
videoDetailController.videoState.value is! Error) {
|
||||
await videoDetailController.playerInit();
|
||||
}
|
||||
|
||||
plPlayerController
|
||||
?..addStatusLister(playerListener)
|
||||
..addPositionListener(positionListener);
|
||||
() async {
|
||||
if (videoDetailController.autoPlay.value) {
|
||||
await videoDetailController.playerInit(
|
||||
autoplay: videoDetailController.playerStatus == PlayerStatus.playing,
|
||||
);
|
||||
} else if (videoDetailController.plPlayerController.preInitPlayer &&
|
||||
!videoDetailController.isQuerying &&
|
||||
videoDetailController.videoState.value is! Error) {
|
||||
await videoDetailController.playerInit();
|
||||
}
|
||||
|
||||
plPlayerController
|
||||
?..addStatusLister(playerListener)
|
||||
..addPositionListener(positionListener);
|
||||
}();
|
||||
|
||||
super.didPopNext();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user