mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 11:22:16 +08:00
refa: download video (#1737)
* opt: save pb danmaku * refa: download video * opt: replaceAll * fix: wait delete * opt: remove completer * fix: index.json * tweaks Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
37b1228552
commit
407b31c5c1
@@ -6,7 +6,6 @@ import 'package:get/get.dart';
|
||||
|
||||
class DownloadPageController extends GetxController {
|
||||
final _downloadService = Get.find<DownloadService>();
|
||||
late final StreamSubscription _sub;
|
||||
final pages = RxList<DownloadPageInfo>();
|
||||
final flag = RxInt(0);
|
||||
|
||||
@@ -14,14 +13,12 @@ class DownloadPageController extends GetxController {
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
_loadList();
|
||||
_sub = _downloadService.downloaFlag.listen((_) {
|
||||
_loadList();
|
||||
});
|
||||
_downloadService.flagNotifier.add(_loadList);
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
_sub.cancel();
|
||||
_downloadService.flagNotifier.remove(_loadList);
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user