diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index aeb9ff136..97612456f 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -1156,7 +1156,7 @@ class _VideoDetailPageState extends State bool showReply = true, }) { int length = (showIntro ? 1 : 0) + (showReply ? 1 : 0); - if (length != 0 && videoDetailController.tabCtr.length != length) { + if (videoDetailController.tabCtr.length != length) { videoDetailController.tabCtr = TabController(length: length, vsync: this); } diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index 203ea096b..e1107e796 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -1351,6 +1351,10 @@ class PlPlayerController { } static void updatePlayCount() { - _instance?._playerCount.value -= 1; + if (_instance?._playerCount.value == 1) { + _instance?.dispose(); + } else { + _instance?._playerCount.value -= 1; + } } }