mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-19 19:01:24 +08:00
Compare commits
2 Commits
de6e402d97
...
db30aa8041
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db30aa8041 | ||
|
|
6f95456d20 |
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,13 +2118,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
}
|
||||
}
|
||||
|
||||
void _onPopInvokedWithResult(bool didPop, result) {
|
||||
videoDetailController.plPlayerController.onPopInvokedWithResult(
|
||||
didPop,
|
||||
result,
|
||||
);
|
||||
}
|
||||
|
||||
void onShowMemberPage(int? mid) {
|
||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||
shape: const RoundedRectangleBorder(),
|
||||
|
||||
@@ -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