Merge branch 'main' into feature-liveRoomRender
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
// import 'package:hive/hive.dart';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:pilipala/models/model_owner.dart';
|
||||
import 'package:pilipala/models/search/hot.dart';
|
||||
import 'package:pilipala/models/user/info.dart';
|
||||
import '../models/common/gesture_mode.dart';
|
||||
import 'global_data.dart';
|
||||
|
||||
class GStrorage {
|
||||
static late final Box<dynamic> userInfo;
|
||||
@ -44,6 +44,13 @@ class GStrorage {
|
||||
);
|
||||
// 视频设置
|
||||
video = await Hive.openBox('video');
|
||||
GlobalData().imgQuality =
|
||||
setting.get(SettingBoxKey.defaultPicQa, defaultValue: 10); // 设置全局变量
|
||||
GlobalData().fullScreenGestureMode = FullScreenGestureMode.values[
|
||||
setting.get(SettingBoxKey.fullScreenGestureMode,
|
||||
defaultValue: FullScreenGestureMode.values.last.index) as int];
|
||||
GlobalData().enablePlayerControlAnimation = setting
|
||||
.get(SettingBoxKey.enablePlayerControlAnimation, defaultValue: true);
|
||||
}
|
||||
|
||||
static void regAdapter() {
|
||||
@ -94,11 +101,13 @@ class SettingBoxKey {
|
||||
enableCDN = 'enableCDN',
|
||||
autoPiP = 'autoPiP',
|
||||
enableAutoLongPressSpeed = 'enableAutoLongPressSpeed',
|
||||
enablePlayerControlAnimation = 'enablePlayerControlAnimation',
|
||||
|
||||
// youtube 双击快进快退
|
||||
enableQuickDouble = 'enableQuickDouble',
|
||||
enableShowDanmaku = 'enableShowDanmaku',
|
||||
enableBackgroundPlay = 'enableBackgroundPlay',
|
||||
fullScreenGestureMode = 'fullScreenGestureMode',
|
||||
|
||||
/// 隐私
|
||||
blackMidsList = 'blackMidsList',
|
||||
@ -122,7 +131,9 @@ class SettingBoxKey {
|
||||
enableWordRe = 'enableWordRe',
|
||||
enableSearchWord = 'enableSearchWord',
|
||||
enableSystemProxy = 'enableSystemProxy',
|
||||
enableAi = 'enableAi';
|
||||
enableAi = 'enableAi',
|
||||
defaultHomePage = 'defaultHomePage',
|
||||
enableRelatedVideo = 'enableRelatedVideo';
|
||||
|
||||
/// 外观
|
||||
static const String themeMode = 'themeMode',
|
||||
@ -172,6 +183,8 @@ class VideoBoxKey {
|
||||
videoSpeed = 'videoSpeed',
|
||||
// 播放顺序
|
||||
playRepeat = 'playRepeat',
|
||||
// 系统预设倍速
|
||||
playSpeedSystem = 'playSpeedSystem',
|
||||
// 默认倍速
|
||||
playSpeedDefault = 'playSpeedDefault',
|
||||
// 默认长按倍速
|
||||
|
||||
Reference in New Issue
Block a user