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