mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
some fixes (#498)
* nologin reject headtbeat * fix: change anonymity * use account as key
This commit is contained in:
committed by
GitHub
parent
9d0ac30fad
commit
7c3e3cb1f8
@@ -96,7 +96,6 @@ class VideoDetailController extends GetxController
|
||||
double? brightness;
|
||||
// 默认记录历史记录
|
||||
bool enableHeart = true;
|
||||
dynamic userInfo;
|
||||
Floating? floating;
|
||||
late PreferredSizeWidget headerControl;
|
||||
|
||||
@@ -250,7 +249,6 @@ class VideoDetailController extends GetxController
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
userInfo = GStorage.userInfo.get('userInfoCache');
|
||||
var keys = Get.arguments.keys.toList();
|
||||
if (keys.isNotEmpty) {
|
||||
if (keys.contains('videoItem')) {
|
||||
@@ -284,7 +282,7 @@ class VideoDetailController extends GetxController
|
||||
setting.get(SettingBoxKey.autoPlayEnable, defaultValue: false);
|
||||
if (autoPlay.value) isShowCover.value = false;
|
||||
enableHA.value = setting.get(SettingBoxKey.enableHA, defaultValue: true);
|
||||
if (userInfo == null ||
|
||||
if (!Accounts.get(AccountType.heartbeat).isLogin ||
|
||||
GStorage.localCache.get(LocalCacheKey.historyPause) == true) {
|
||||
enableHeart = false;
|
||||
}
|
||||
|
||||
@@ -1039,7 +1039,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
await videoIntroController.viewLater();
|
||||
break;
|
||||
case 'report':
|
||||
if (videoDetailController.userInfo == null) {
|
||||
if (!Accounts.main.isLogin) {
|
||||
SmartDialog.showToast('账号未登录');
|
||||
} else {
|
||||
Get.toNamed('/webview', parameters: {
|
||||
|
||||
@@ -874,9 +874,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
.viewLater();
|
||||
break;
|
||||
case 'report':
|
||||
if (videoDetailController
|
||||
.userInfo ==
|
||||
null) {
|
||||
if (!Accounts
|
||||
.main.isLogin) {
|
||||
SmartDialog.showToast(
|
||||
'账号未登录');
|
||||
} else {
|
||||
@@ -1418,7 +1417,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
await videoIntroController.viewLater();
|
||||
break;
|
||||
case 'report':
|
||||
if (videoDetailController.userInfo == null) {
|
||||
if (!Accounts.main.isLogin) {
|
||||
SmartDialog.showToast('账号未登录');
|
||||
} else {
|
||||
Get.toNamed('/webview', parameters: {
|
||||
|
||||
@@ -545,7 +545,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
onTap: () {
|
||||
if (videoDetailCtr.userInfo == null) {
|
||||
if (!Accounts.main.isLogin) {
|
||||
SmartDialog.showToast('账号未登录');
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user