mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
remove boolext
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -166,7 +166,7 @@ class VideoIntroController extends GetxController {
|
||||
if (videoDetailController.videoItem['pic'] == null ||
|
||||
videoDetailController.videoItem['pic'] == '' ||
|
||||
(videoDetailController.videoUrl.isNullOrEmpty &&
|
||||
videoDetailController.isQuerying.not)) {
|
||||
!videoDetailController.isQuerying)) {
|
||||
videoDetailController.videoItem['pic'] = data.pic;
|
||||
}
|
||||
if (videoDetailController.showReply) {
|
||||
@@ -340,7 +340,7 @@ class VideoIntroController extends GetxController {
|
||||
_coinNum.value += coin;
|
||||
GlobalData().afterCoin(coin);
|
||||
videoDetail.value.stat!.coin = videoDetail.value.stat!.coin! + coin;
|
||||
if (selectLike && hasLike.value.not) {
|
||||
if (selectLike && !hasLike.value) {
|
||||
hasLike.value = true;
|
||||
videoDetail.value.stat!.like = videoDetail.value.stat!.like! + 1;
|
||||
}
|
||||
@@ -411,7 +411,7 @@ class VideoIntroController extends GetxController {
|
||||
for (var i in favFolderData.value.list!.toList()) {
|
||||
bool isFaved = favIds?.contains(i.id) == true;
|
||||
if (i.favState == 1) {
|
||||
if (isFaved.not) {
|
||||
if (!isFaved) {
|
||||
addMediaIdsNew.add(i.id);
|
||||
}
|
||||
} else {
|
||||
@@ -695,7 +695,7 @@ class VideoIntroController extends GetxController {
|
||||
|
||||
// 查看同时在看人数
|
||||
Future<void> queryOnlineTotal() async {
|
||||
if (isShowOnlineTotal.not) {
|
||||
if (!isShowOnlineTotal) {
|
||||
return;
|
||||
}
|
||||
var result = await VideoHttp.onlineTotal(
|
||||
@@ -723,7 +723,7 @@ class VideoIntroController extends GetxController {
|
||||
|
||||
final videoDetailCtr = Get.find<VideoDetailController>(tag: heroTag);
|
||||
|
||||
if (skipPages.not && (videoDetail.value.pages?.length ?? 0) > 1) {
|
||||
if (!skipPages && (videoDetail.value.pages?.length ?? 0) > 1) {
|
||||
isPages = true;
|
||||
final List<Part> pages = videoDetail.value.pages!;
|
||||
episodes.addAll(pages);
|
||||
@@ -775,7 +775,7 @@ class VideoIntroController extends GetxController {
|
||||
final videoDetailCtr = Get.find<VideoDetailController>(tag: heroTag);
|
||||
|
||||
// part -> playall -> season
|
||||
if (skipPages.not && (videoDetail.value.pages?.length ?? 0) > 1) {
|
||||
if (!skipPages && (videoDetail.value.pages?.length ?? 0) > 1) {
|
||||
isPages = true;
|
||||
final List<Part> pages = videoDetail.value.pages!;
|
||||
episodes.addAll(pages);
|
||||
@@ -811,7 +811,7 @@ class VideoIntroController extends GetxController {
|
||||
|
||||
int nextIndex = currentIndex + 1;
|
||||
|
||||
if (isPages.not &&
|
||||
if (!isPages &&
|
||||
videoDetailCtr.isPlayAll &&
|
||||
currentIndex == episodes.length - 2) {
|
||||
videoDetailCtr.getMediaList();
|
||||
|
||||
@@ -203,7 +203,7 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
);
|
||||
|
||||
Future<void> handleState(FutureOr Function() action) async {
|
||||
if (isProcessing.not) {
|
||||
if (!isProcessing) {
|
||||
isProcessing = true;
|
||||
await action();
|
||||
isProcessing = false;
|
||||
@@ -223,7 +223,7 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
initialExpanded: alwaysExapndIntroPanel,
|
||||
);
|
||||
|
||||
if (alwaysExapndIntroPanel.not && GStorage.exapndIntroPanelH) {
|
||||
if (!alwaysExapndIntroPanel && GStorage.exapndIntroPanelH) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (context.orientation == Orientation.landscape &&
|
||||
videoIntroController.expandableCtr?.expanded == false) {
|
||||
@@ -684,7 +684,8 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
),
|
||||
),
|
||||
if (videoIntroController
|
||||
.videoDetail.value.descV2.isNullOrEmpty.not) ...[
|
||||
.videoDetail.value.descV2?.isNotEmpty ==
|
||||
true) ...[
|
||||
const SizedBox(height: 8),
|
||||
SelectableText.rich(
|
||||
style: const TextStyle(
|
||||
@@ -748,7 +749,7 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
.queryVideoIntroData["status"] = true;
|
||||
videoIntroController.queryVideoIntro();
|
||||
if (videoDetailCtr.videoUrl.isNullOrEmpty &&
|
||||
videoDetailCtr.isQuerying.not) {
|
||||
!videoDetailCtr.isQuerying) {
|
||||
videoDetailCtr.queryVideoUrl();
|
||||
}
|
||||
},
|
||||
@@ -766,8 +767,8 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
videoDetail.ugcSeason != null &&
|
||||
(context.orientation != Orientation.landscape ||
|
||||
(context.orientation == Orientation.landscape &&
|
||||
videoDetailCtr.plPlayerController
|
||||
.horizontalSeasonPanel.not)))
|
||||
!videoDetailCtr
|
||||
.plPlayerController.horizontalSeasonPanel)))
|
||||
Obx(
|
||||
() => SeasonPanel(
|
||||
key: ValueKey(videoIntroController.videoDetail.value),
|
||||
@@ -782,8 +783,8 @@ class _VideoInfoState extends State<VideoInfo> {
|
||||
videoDetail.pages!.length > 1 &&
|
||||
(context.orientation != Orientation.landscape ||
|
||||
(context.orientation == Orientation.landscape &&
|
||||
videoDetailCtr.plPlayerController
|
||||
.horizontalSeasonPanel.not))) ...[
|
||||
!videoDetailCtr.plPlayerController
|
||||
.horizontalSeasonPanel))) ...[
|
||||
Obx(
|
||||
() => PagesPanel(
|
||||
key: ValueKey(videoIntroController.videoDetail.value),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart' show HapticFeedback;
|
||||
@@ -68,7 +67,7 @@ class ActionItemState extends State<ActionItem>
|
||||
void _cancelLongPress([bool isCancel = false]) {
|
||||
int duration = DateTime.now().millisecondsSinceEpoch - _lastTime;
|
||||
if (duration >= 200 && duration < 1500) {
|
||||
if (widget.hasTriple.not) {
|
||||
if (!widget.hasTriple) {
|
||||
controller?.reverse();
|
||||
widget.callBack?.call(false);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:PiliPlus/models/video_detail/episode.dart';
|
||||
import 'package:PiliPlus/models/video_detail/section.dart';
|
||||
import 'package:PiliPlus/pages/video/controller.dart';
|
||||
import 'package:PiliPlus/pages/video/introduction/ugc/controller.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -69,7 +68,7 @@ class _SeasonPanelState extends State<SeasonPanel> {
|
||||
if (_videoDetailController.seasonCid != cid) {
|
||||
bool isPart =
|
||||
videoDetail.pages?.indexWhere((item) => item.cid == cid) != -1;
|
||||
if (isPart.not) {
|
||||
if (!isPart) {
|
||||
_videoDetailController.seasonCid = cid;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user