mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-26 02:58:39 +00:00
feat: video download
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -3,13 +3,13 @@ import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_area_list/area_item.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_area_list/area_list.dart';
|
||||
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
||||
import 'package:PiliPlus/services/account_service.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class LiveAreaController
|
||||
extends CommonListController<List<AreaList>?, AreaList> {
|
||||
AccountService accountService = Get.find<AccountService>();
|
||||
late final isLogin = Accounts.main.isLogin;
|
||||
|
||||
late final isEditing = false.obs;
|
||||
late final favInfo = {};
|
||||
@@ -17,7 +17,7 @@ class LiveAreaController
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
if (accountService.isLogin.value) {
|
||||
if (isLogin) {
|
||||
queryFavTags();
|
||||
}
|
||||
queryData();
|
||||
@@ -25,7 +25,7 @@ class LiveAreaController
|
||||
|
||||
@override
|
||||
Future<void> onRefresh() {
|
||||
if (accountService.isLogin.value) {
|
||||
if (isLogin) {
|
||||
queryFavTags();
|
||||
}
|
||||
return super.onRefresh();
|
||||
|
||||
@@ -34,7 +34,7 @@ class _LiveAreaPageState extends State<LiveAreaPage> {
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
title: const Text('全部标签'),
|
||||
actions: _controller.accountService.isLogin.value
|
||||
actions: _controller.isLogin
|
||||
? [
|
||||
TextButton(
|
||||
onPressed: _controller.onEdit,
|
||||
@@ -54,7 +54,7 @@ class _LiveAreaPageState extends State<LiveAreaPage> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (_controller.accountService.isLogin.value)
|
||||
if (_controller.isLogin)
|
||||
Obx(() => _buildFavWidget(theme, _controller.favState.value)),
|
||||
Expanded(
|
||||
child: Obx(
|
||||
|
||||
Reference in New Issue
Block a user