diff --git a/lib/danmaku/danmaku_settings.dart b/lib/danmaku/danmaku_settings.dart index 23bf8ac..fb1386b 100644 --- a/lib/danmaku/danmaku_settings.dart +++ b/lib/danmaku/danmaku_settings.dart @@ -1,3 +1,8 @@ +import 'dart:io'; + +import 'package:get/get.dart'; +import 'package:get/get_core/src/get_main.dart'; +import 'package:miru_app/danmaku/danmaku_source_settings.dart'; import 'package:miru_app/router/router.dart'; import 'package:miru_app/utils/utils.dart'; import 'package:flutter/material.dart'; @@ -32,7 +37,6 @@ class _DanmakuSettingsPageState extends State { } void onBackPressed(BuildContext context) { - navigationBarState.showNavigate(); // Navigator.of(context).pop(); } @@ -60,7 +64,6 @@ class _DanmakuSettingsPageState extends State { @override Widget build(BuildContext context) { WidgetsBinding.instance.addPostFrameCallback((_) { - navigationBarState.hideNavigate(); }); return PopScope( canPop: true, @@ -73,7 +76,11 @@ class _DanmakuSettingsPageState extends State { children: [ ListTile( onTap: () { - router.push('/settings/danmaku/source'); + if (!Platform.isAndroid) { + router.push('/settings/danmaku/source'); + } else { + Get.to(() => const DanmakuSourceSettingsPage()); + } }, dense: false, title: const Text('弹幕来源'), diff --git a/lib/views/pages/settings/settings_page.dart b/lib/views/pages/settings/settings_page.dart index 07b9f7a..60ead95 100644 --- a/lib/views/pages/settings/settings_page.dart +++ b/lib/views/pages/settings/settings_page.dart @@ -5,6 +5,7 @@ import 'package:fluent_ui/fluent_ui.dart' as fluent; import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:get/get.dart'; +import 'package:miru_app/danmaku/danmaku_settings.dart'; import 'package:miru_app/data/providers/tmdb_provider.dart'; import 'package:miru_app/controllers/application_controller.dart'; import 'package:miru_app/router/router.dart'; @@ -417,7 +418,11 @@ class _SettingsPageState extends State { title: '弹幕', trailing: const Icon(Icons.chevron_right), onTap: () { + if (!Platform.isAndroid) { router.push('/settings/danmaku'); + } else { + Get.to(() => const DanmakuSettingsPage()); + } }, ), const SizedBox(height: 20),