mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 01:26:59 +08:00
opt video action
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:PiliPlus/http/user.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_folder/data.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_folder/list.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_tag/data.dart';
|
||||
import 'package:PiliPlus/services/account_service.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
@@ -35,20 +34,23 @@ abstract class CommonIntroController extends GetxController {
|
||||
Future<void> actionFavVideo({String type = 'choose'});
|
||||
|
||||
late final enableQuickFav = Pref.enableQuickFav;
|
||||
late int? quickFavId = Pref.quickFavId;
|
||||
int? quickFavId;
|
||||
|
||||
FavFolderInfo get favFolderInfo {
|
||||
int get favFolderId {
|
||||
if (this.quickFavId != null) {
|
||||
return this.quickFavId!;
|
||||
}
|
||||
final quickFavId = Pref.quickFavId;
|
||||
final list = favFolderData.value.list!;
|
||||
if (quickFavId != null) {
|
||||
final folderInfo = list.firstWhereOrNull((e) => e.id == quickFavId);
|
||||
if (folderInfo != null) {
|
||||
return folderInfo;
|
||||
return this.quickFavId = quickFavId;
|
||||
} else {
|
||||
quickFavId = null;
|
||||
GStorage.setting.delete(SettingBoxKey.quickFavId);
|
||||
}
|
||||
}
|
||||
return list.first;
|
||||
return this.quickFavId = list.first.id;
|
||||
}
|
||||
|
||||
// 收藏
|
||||
|
||||
Reference in New Issue
Block a user