opt play all btn

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-05-17 21:55:37 +08:00
parent 4f35962127
commit 344e2eb29c
7 changed files with 164 additions and 128 deletions

View File

@@ -1,21 +1,10 @@
import 'package:PiliPlus/models/common/later_view_type.dart';
import 'package:PiliPlus/utils/storage.dart';
import 'package:PiliPlus/utils/storage_key.dart';
import 'package:PiliPlus/utils/storage_pref.dart';
import 'package:PiliPlus/pages/common/play_all_btn_mixin.dart';
import 'package:get/get.dart';
class LaterBaseController extends GetxController {
class LaterBaseController extends GetxController with PlayAllBtnMixin {
RxBool enableMultiSelect = false.obs;
RxInt checkedCount = 0.obs;
RxList<int> counts = List.filled(LaterViewType.values.length, -1).obs;
late double dx = 0;
late final RxBool isPlayAll = Pref.enablePlayAll.obs;
void setIsPlayAll(bool isPlayAll) {
if (this.isPlayAll.value == isPlayAll) return;
this.isPlayAll.value = isPlayAll;
GStorage.setting.put(SettingBoxKey.enablePlayAll, isPlayAll);
}
}