diff --git a/lib/main.dart b/lib/main.dart index 2cee03f74..5a7920998 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -123,8 +123,6 @@ void main() async { ), ); } - } else if (Platform.isMacOS) { - await setupServiceLocator(); } Request(); diff --git a/lib/pages/setting/models/play_settings.dart b/lib/pages/setting/models/play_settings.dart index 383991614..e9fc70256 100644 --- a/lib/pages/setting/models/play_settings.dart +++ b/lib/pages/setting/models/play_settings.dart @@ -183,14 +183,13 @@ List get playSettings => [ defaultVal: true, onChanged: (value) => allowRotateScreen = value, ), - if (PlatformUtils.isMobile) - const SwitchModel( - title: '后台播放', - subtitle: '进入后台时继续播放', - leading: Icon(Icons.motion_photos_pause_outlined), - setKey: SettingBoxKey.continuePlayInBackground, - defaultVal: false, - ), + const SwitchModel( + title: '后台播放', + subtitle: '进入后台时继续播放', + leading: Icon(Icons.motion_photos_pause_outlined), + setKey: SettingBoxKey.continuePlayInBackground, + defaultVal: false, + ), if (Platform.isAndroid) ...[ SwitchModel( title: '后台画中画', diff --git a/lib/pages/video/widgets/header_control.dart b/lib/pages/video/widgets/header_control.dart index 0fcf0db19..b6e49d32b 100644 --- a/lib/pages/video/widgets/header_control.dart +++ b/lib/pages/video/widgets/header_control.dart @@ -565,18 +565,15 @@ class HeaderControlState extends State ); }, ), - if (PlatformUtils.isMobile) - Obx( - () => ActionRowLineItem( - iconData: Icons.play_circle_outline, - onTap: - plPlayerController.setContinuePlayInBackground, - text: " 后台播放 ", - selectStatus: plPlayerController - .continuePlayInBackground - .value, - ), + Obx( + () => ActionRowLineItem( + iconData: Icons.play_circle_outline, + onTap: plPlayerController.setContinuePlayInBackground, + text: " 后台播放 ", + selectStatus: + plPlayerController.continuePlayInBackground.value, ), + ), ], ), ),