mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: manul skip
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -724,7 +724,7 @@ class VideoDetailController extends GetxController
|
|||||||
SmartDialog.showToast(
|
SmartDialog.showToast(
|
||||||
msg,
|
msg,
|
||||||
alignment:
|
alignment:
|
||||||
plPlayerController.isFullScreen.value ? Alignment(-0.9, 0.5) : null,
|
plPlayerController.isFullScreen.value ? Alignment(0, 0.7) : null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -789,7 +789,6 @@ class VideoDetailController extends GetxController
|
|||||||
second: _convert(item['segment'][1]),
|
second: _convert(item['segment'][1]),
|
||||||
),
|
),
|
||||||
skipType: skipType,
|
skipType: skipType,
|
||||||
hasSkipped: false,
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
).toList());
|
).toList());
|
||||||
@@ -838,8 +837,7 @@ class VideoDetailController extends GetxController
|
|||||||
} else if (item.skipType == SkipType.skipManually) {
|
} else if (item.skipType == SkipType.skipManually) {
|
||||||
listData.insert(0, item);
|
listData.insert(0, item);
|
||||||
listKey.currentState?.insertItem(0);
|
listKey.currentState?.insertItem(0);
|
||||||
skipTimer ??=
|
skipTimer ??= Timer.periodic(const Duration(seconds: 3), (_) {
|
||||||
Timer.periodic(const Duration(milliseconds: 2500), (_) {
|
|
||||||
if (listData.isNotEmpty) {
|
if (listData.isNotEmpty) {
|
||||||
onRemoveItem(listData.length - 1, listData.last);
|
onRemoveItem(listData.length - 1, listData.last);
|
||||||
} else {
|
} else {
|
||||||
@@ -857,7 +855,8 @@ class VideoDetailController extends GetxController
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onRemoveItem(int index, SegmentModel item) {
|
void onRemoveItem(int index, SegmentModel item) {
|
||||||
EasyThrottle.throttle('onRemoveItem', const Duration(seconds: 1), () {
|
EasyThrottle.throttle('onRemoveItem', const Duration(milliseconds: 500),
|
||||||
|
() {
|
||||||
try {
|
try {
|
||||||
listData.removeAt(index);
|
listData.removeAt(index);
|
||||||
listKey.currentState?.removeItem(
|
listKey.currentState?.removeItem(
|
||||||
@@ -881,10 +880,11 @@ class VideoDetailController extends GetxController
|
|||||||
child: SearchText(
|
child: SearchText(
|
||||||
bgColor: Theme.of(Get.context!)
|
bgColor: Theme.of(Get.context!)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onInverseSurface
|
.secondaryContainer
|
||||||
.withOpacity(0.7),
|
.withOpacity(0.8),
|
||||||
|
textColor: Theme.of(Get.context!).colorScheme.onSecondaryContainer,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||||
fontSize: 13,
|
fontSize: 14,
|
||||||
text: '跳过: ${item.segmentType.shortTitle}',
|
text: '跳过: ${item.segmentType.shortTitle}',
|
||||||
onTap: (_) {
|
onTap: (_) {
|
||||||
onSkip(item);
|
onSkip(item);
|
||||||
|
|||||||
Reference in New Issue
Block a user