related #306

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-23 14:44:03 +08:00
parent 108648cabf
commit e573a8a9c0
4 changed files with 13 additions and 10 deletions

View File

@@ -480,11 +480,9 @@ class BangumiIntroController extends CommonController {
// 重新请求评论 // 重新请求评论
if (videoDetailCtr.showReply) { if (videoDetailCtr.showReply) {
try { try {
/// 未渲染回复组件时可能异常 Get.find<VideoReplyController>(tag: Get.arguments['heroTag'])
VideoReplyController videoReplyCtr = ..aid = aid
Get.find<VideoReplyController>(tag: Get.arguments['heroTag']); ..onReload();
videoReplyCtr.aid = aid;
videoReplyCtr.onRefresh();
} catch (_) {} } catch (_) {}
} }

View File

@@ -639,7 +639,7 @@ class VideoIntroController extends GetxController
try { try {
Get.find<VideoReplyController>(tag: heroTag) Get.find<VideoReplyController>(tag: heroTag)
..aid = aid ..aid = aid
..onRefresh(); ..onReload();
} catch (_) {} } catch (_) {}
} }

View File

@@ -584,7 +584,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
!isFullScreen && !isFullScreen &&
isShowing && isShowing &&
mounted) { mounted) {
if (!removeSafeArea) showStatusBar(); if (videoDetailController.imageStatus.not &&
removeSafeArea.not) {
showStatusBar();
}
} }
return Container( return Container(
color: Colors.black, color: Colors.black,
@@ -1228,9 +1231,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
videoDetailController.tabCtr = TabController( videoDetailController.tabCtr = TabController(
vsync: this, vsync: this,
length: tabs.length, length: tabs.length,
initialIndex: tabs.length > videoDetailController.tabCtr.length initialIndex:
? videoDetailController.tabCtr.index videoDetailController.tabCtr.index.clamp(0, tabs.length - 1),
: 0,
); );
} }

View File

@@ -5,6 +5,7 @@ import 'package:device_info_plus/device_info_plus.dart';
import 'package:auto_orientation/auto_orientation.dart'; import 'package:auto_orientation/auto_orientation.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:status_bar_control/status_bar_control.dart';
import '../../../utils/storage.dart'; import '../../../utils/storage.dart';
@@ -74,6 +75,7 @@ Future<void> hideStatusBar() async {
await SystemChrome.setEnabledSystemUIMode( await SystemChrome.setEnabledSystemUIMode(
SystemUiMode.immersiveSticky, SystemUiMode.immersiveSticky,
); );
StatusBarControl.setHidden(true);
} }
//退出全屏显示 //退出全屏显示
@@ -92,6 +94,7 @@ Future<void> showStatusBar() async {
mode, mode,
overlays: SystemUiOverlay.values, overlays: SystemUiOverlay.values,
); );
StatusBarControl.setHidden(false);
} else if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) { } else if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
await const MethodChannel('com.alexmercerind/media_kit_video') await const MethodChannel('com.alexmercerind/media_kit_video')
.invokeMethod( .invokeMethod(