* opt: marquee

* fix: bangumi seek

* opt: post panel

* opt: remove deprecated code

* opt: singleton dynController

* fix: music scheme

* feat: MemberVideo jump keep position

* tweak
This commit is contained in:
My-Responsitories
2025-09-04 20:29:02 +08:00
committed by GitHub
parent e8a674ca2a
commit 172389b12b
51 changed files with 1314 additions and 1227 deletions

View File

@@ -33,38 +33,31 @@ void main() async {
WidgetsFlutterBinding.ensureInitialized();
MediaKit.ensureInitialized();
await GStorage.init();
Get.put(AccountService());
if (Pref.autoClearCache) {
await CacheManage.clearLibraryCache();
} else {
final num maxCacheSize = Pref.maxCacheSize;
if (maxCacheSize != 0) {
final double currCache = await CacheManage().loadApplicationCache();
if (currCache >= maxCacheSize) {
await CacheManage.clearLibraryCache();
}
}
}
if (Pref.horizontalScreen) {
await SystemChrome.setPreferredOrientations(
//支持竖屏与横屏
[
DeviceOrientation.portraitUp,
// DeviceOrientation.portraitDown,
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
],
);
} else {
await SystemChrome.setPreferredOrientations(
//支持竖屏
[
DeviceOrientation.portraitUp,
],
);
}
Get.lazyPut(AccountService.new);
HttpOverrides.global = _CustomHttpOverrides();
await setupServiceLocator();
await Future.wait([
CacheManage.autoClearCache(),
if (Pref.horizontalScreen)
SystemChrome.setPreferredOrientations(
//支持竖屏与横屏
[
DeviceOrientation.portraitUp,
// DeviceOrientation.portraitDown,
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
],
)
else
SystemChrome.setPreferredOrientations(
//支持竖屏
[
DeviceOrientation.portraitUp,
],
),
setupServiceLocator(),
]);
Request();
Request.setCookie();