This commit is contained in:
My-Responsitories
2026-01-07 15:01:13 +08:00
parent 678cc919c7
commit a575fc7627
8 changed files with 52 additions and 47 deletions

View File

@@ -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)}',

View File

@@ -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;
}
}

View File

@@ -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