fix: play all after multi select

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-28 19:55:05 +08:00
parent 0e253ecb83
commit 07307a666c
8 changed files with 19 additions and 17 deletions

View File

@@ -127,7 +127,8 @@ class FavDetailController extends MultiSelectController {
void toViewPlayAll() {
if (loadingState.value is Success) {
List<FavDetailItemData> list = (loadingState.value as Success).response;
List<FavDetailItemData> list = List<FavDetailItemData>.from(
(loadingState.value as Success).response);
for (FavDetailItemData element in list) {
if (element.cid == null) {
continue;

View File

@@ -360,9 +360,9 @@ class _FavDetailPageState extends State<FavDetailPage> {
},
),
Positioned(
top: 8,
top: 5,
left: 12,
bottom: 8,
bottom: 5,
child: IgnorePointer(
child: LayoutBuilder(
builder: (context, constraints) =>

View File

@@ -77,7 +77,7 @@ class FavVideoCardH extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: StyleString.safeSpace,
vertical: StyleString.cardSpace,
vertical: 5,
),
child: LayoutBuilder(
builder: (context, boxConstraints) {

View File

@@ -163,7 +163,7 @@ class HistoryItem extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: StyleString.safeSpace,
vertical: StyleString.cardSpace,
vertical: 5,
),
child: LayoutBuilder(
builder: (context, boxConstraints) {

View File

@@ -168,7 +168,8 @@ class LaterController extends MultiSelectController {
// 稍后再看播放全部
void toViewPlayAll() {
if (loadingState.value is Success) {
List<HotVideoItemModel> list = (loadingState.value as Success).response;
List<HotVideoItemModel> list = List<HotVideoItemModel>.from(
(loadingState.value as Success).response);
for (HotVideoItemModel item in list) {
if (item.cid == null) {
continue;

View File

@@ -28,7 +28,7 @@ class SubItem extends StatelessWidget {
},
),
child: Padding(
padding: const EdgeInsets.fromLTRB(12, 7, 12, 7),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 7),
child: LayoutBuilder(
builder: (context, boxConstraints) {
double width =

View File

@@ -41,8 +41,10 @@ class SubVideoCardH extends StatelessWidget {
});
},
child: Padding(
padding: const EdgeInsets.fromLTRB(
StyleString.safeSpace, 5, StyleString.safeSpace, 5),
padding: const EdgeInsets.symmetric(
horizontal: StyleString.safeSpace,
vertical: 5,
),
child: LayoutBuilder(
builder: (context, boxConstraints) {
double width =

View File

@@ -131,16 +131,14 @@ class VideoIntroController extends GetxController
if (result['status']) {
videoDetail.value = result['data']!;
videoItem!['staff'] = result['data'].staff;
try {
final videoDetailController =
Get.find<VideoDetailController>(tag: heroTag);
if (videoDetailController.videoItem['pic'] == null ||
videoDetailController.videoItem['pic'] == '') {
try {
videoDetailController.videoItem['pic'] = result['data'].pic;
} catch (e) {
debugPrint(e.toString());
}
}
} catch (_) {}
if (videoDetail.value.pages != null &&
videoDetail.value.pages!.isNotEmpty &&
lastPlayCid.value == 0) {