mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-10 21:11:27 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db30aa8041 | ||
|
|
6f95456d20 | ||
|
|
de6e402d97 |
@@ -433,7 +433,9 @@ class _EpisodePanelState extends State<EpisodePanel>
|
|||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (episode.badge == "会员" && vipStatus != 1) {
|
if (episode.badge == "会员" &&
|
||||||
|
Accounts.mainEqVideo &&
|
||||||
|
vipStatus != 1) {
|
||||||
SmartDialog.showToast('需要大会员');
|
SmartDialog.showToast('需要大会员');
|
||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -346,8 +346,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
}
|
}
|
||||||
return popScope(
|
return popScope(
|
||||||
canPop: !isFullScreen && !plPlayerController.isDesktopPip,
|
canPop: !isFullScreen && !plPlayerController.isDesktopPip,
|
||||||
onPopInvokedWithResult: (didPop, result) =>
|
onPopInvokedWithResult: plPlayerController.onPopInvokedWithResult,
|
||||||
plPlayerController.onPopInvokedWithResult(didPop, result, isPortrait),
|
|
||||||
child: player,
|
child: player,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -221,10 +221,10 @@ class _MemberPageState extends State<MemberPage> {
|
|||||||
isFollow: isFollow,
|
isFollow: isFollow,
|
||||||
);
|
);
|
||||||
if (res.isSuccess) {
|
if (res.isSuccess) {
|
||||||
if (!context.mounted) return;
|
|
||||||
e
|
e
|
||||||
..total += isFollow ? -1 : 1
|
..total += isFollow ? -1 : 1
|
||||||
..isFollow = !isFollow;
|
..isFollow = !isFollow;
|
||||||
|
if (!context.mounted) return;
|
||||||
(context as Element).markNeedsBuild();
|
(context as Element).markNeedsBuild();
|
||||||
} else {
|
} else {
|
||||||
res.toast();
|
res.toast();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import 'package:PiliPlus/pages/video/controller.dart';
|
|||||||
import 'package:PiliPlus/pages/video/introduction/ugc/controller.dart';
|
import 'package:PiliPlus/pages/video/introduction/ugc/controller.dart';
|
||||||
import 'package:PiliPlus/pages/video/introduction/ugc/widgets/page.dart';
|
import 'package:PiliPlus/pages/video/introduction/ugc/widgets/page.dart';
|
||||||
import 'package:PiliPlus/services/download/download_service.dart';
|
import 'package:PiliPlus/services/download/download_service.dart';
|
||||||
|
import 'package:PiliPlus/utils/accounts.dart';
|
||||||
import 'package:PiliPlus/utils/date_utils.dart';
|
import 'package:PiliPlus/utils/date_utils.dart';
|
||||||
import 'package:PiliPlus/utils/duration_utils.dart';
|
import 'package:PiliPlus/utils/duration_utils.dart';
|
||||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||||
@@ -254,7 +255,7 @@ class _DownloadPanelState extends State<DownloadPanel> {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kReleaseMode && episode.badge == '会员') {
|
if (kReleaseMode && episode.badge == '会员' && Accounts.mainEqVideo) {
|
||||||
if (vipStatus != 1) {
|
if (vipStatus != 1) {
|
||||||
if (!isDownloadAll) {
|
if (!isDownloadAll) {
|
||||||
SmartDialog.showToast('需要大会员');
|
SmartDialog.showToast('需要大会员');
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/models_new/pgc/pgc_info_model/new_ep.dart';
|
|||||||
import 'package:PiliPlus/models_new/video/video_detail/episode.dart'
|
import 'package:PiliPlus/models_new/video/video_detail/episode.dart'
|
||||||
hide EpisodeItem;
|
hide EpisodeItem;
|
||||||
import 'package:PiliPlus/pages/video/controller.dart';
|
import 'package:PiliPlus/pages/video/controller.dart';
|
||||||
|
import 'package:PiliPlus/utils/accounts.dart';
|
||||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||||
import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
||||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||||
@@ -166,7 +167,7 @@ class _PgcPanelState extends State<PgcPanel> {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (item.badge == '会员' && vipStatus) {
|
if (item.badge == '会员' && Accounts.mainEqVideo && vipStatus) {
|
||||||
SmartDialog.showToast('需要大会员');
|
SmartDialog.showToast('需要大会员');
|
||||||
}
|
}
|
||||||
widget.onChangeEpisode(item);
|
widget.onChangeEpisode(item);
|
||||||
|
|||||||
@@ -1282,7 +1282,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
!isFullScreen &&
|
!isFullScreen &&
|
||||||
!videoDetailController.plPlayerController.isDesktopPip &&
|
!videoDetailController.plPlayerController.isDesktopPip &&
|
||||||
(videoDetailController.horizontalScreen || isPortrait),
|
(videoDetailController.horizontalScreen || isPortrait),
|
||||||
onPopInvokedWithResult: _onPopInvokedWithResult,
|
onPopInvokedWithResult:
|
||||||
|
videoDetailController.plPlayerController.onPopInvokedWithResult,
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() =>
|
() =>
|
||||||
!videoDetailController.videoState.value ||
|
!videoDetailController.videoState.value ||
|
||||||
@@ -2117,14 +2118,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onPopInvokedWithResult(bool didPop, result) {
|
|
||||||
videoDetailController.plPlayerController.onPopInvokedWithResult(
|
|
||||||
didPop,
|
|
||||||
result,
|
|
||||||
isPortrait,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void onShowMemberPage(int? mid) {
|
void onShowMemberPage(int? mid) {
|
||||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||||
shape: const RoundedRectangleBorder(),
|
shape: const RoundedRectangleBorder(),
|
||||||
|
|||||||
@@ -1756,11 +1756,8 @@ class HeaderControlState extends State<HeaderControl>
|
|||||||
size: 15,
|
size: 15,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
onPressed: () => plPlayerController.onPopInvokedWithResult(
|
onPressed: () =>
|
||||||
false,
|
plPlayerController.onPopInvokedWithResult(false, null),
|
||||||
null,
|
|
||||||
videoDetailCtr.isPortrait,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (!plPlayerController.isDesktopPip &&
|
if (!plPlayerController.isDesktopPip &&
|
||||||
|
|||||||
@@ -1746,7 +1746,7 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void onPopInvokedWithResult(bool didPop, Object? result, bool isPortrait) {
|
void onPopInvokedWithResult(bool didPop, Object? result) {
|
||||||
if (didPop) {
|
if (didPop) {
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
_disableAutoEnterPipIfNeeded();
|
_disableAutoEnterPipIfNeeded();
|
||||||
@@ -1765,8 +1765,6 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
triggerFullScreen(status: false);
|
triggerFullScreen(status: false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!horizontalScreen && !isPortrait) {
|
Get.back();
|
||||||
Get.back();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ abstract final class Accounts {
|
|||||||
AccountType.values.length,
|
AccountType.values.length,
|
||||||
AnonymousAccount(),
|
AnonymousAccount(),
|
||||||
);
|
);
|
||||||
|
static bool get mainEqVideo => main == video;
|
||||||
static Account get main => accountMode[AccountType.main.index];
|
static Account get main => accountMode[AccountType.main.index];
|
||||||
|
static Account get video => accountMode[AccountType.video.index];
|
||||||
static Account get heartbeat => accountMode[AccountType.heartbeat.index];
|
static Account get heartbeat => accountMode[AccountType.heartbeat.index];
|
||||||
static Account get history {
|
static Account get history {
|
||||||
final heartbeat = Accounts.heartbeat;
|
final heartbeat = Accounts.heartbeat;
|
||||||
|
|||||||
Reference in New Issue
Block a user