mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 08:08:19 +08:00
tweaks (#1187)
* 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:
committed by
GitHub
parent
e8a674ca2a
commit
172389b12b
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user