opt: watchLater visible logic
This commit is contained in:
@ -624,10 +624,8 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
|
||||
void toggeleWatchLaterVisible(bool val) {
|
||||
if (sourceType.value == 'watchLater' ||
|
||||
sourceType.value == 'fav' ||
|
||||
sourceType.value == 'up_archive') {
|
||||
isWatchLaterVisible.value = !isWatchLaterVisible.value;
|
||||
if (['watchLater', 'fav', 'up_archive'].contains(sourceType.value)) {
|
||||
isWatchLaterVisible.value = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -206,12 +206,12 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
vdCtr.bottomList.insert(3, BottomControlType.episode);
|
||||
}
|
||||
}
|
||||
vdCtr.toggeleWatchLaterVisible(false);
|
||||
} else {
|
||||
if (vdCtr.bottomList.contains(BottomControlType.episode)) {
|
||||
vdCtr.bottomList.removeAt(3);
|
||||
}
|
||||
}
|
||||
vdCtr.toggeleWatchLaterVisible(!isFullScreen);
|
||||
});
|
||||
}
|
||||
|
||||
@ -825,9 +825,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
/// 稍后再看列表
|
||||
Obx(
|
||||
() => Visibility(
|
||||
visible: vdCtr.sourceType.value == 'watchLater' ||
|
||||
vdCtr.sourceType.value == 'fav' ||
|
||||
vdCtr.sourceType.value == 'up_archive',
|
||||
visible: ['watchLater', 'fav', 'up_archive']
|
||||
.contains(vdCtr.sourceType.value),
|
||||
child: AnimatedPositioned(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
curve: Curves.easeInOut,
|
||||
|
Reference in New Issue
Block a user