diff --git a/lib/pages/main/view.dart b/lib/pages/main/view.dart index fd030906..2e700140 100644 --- a/lib/pages/main/view.dart +++ b/lib/pages/main/view.dart @@ -204,7 +204,7 @@ class _MainAppState extends State if (useSideBar || !isPortrait) ...[ Obx( () => _mainController.navigationBars.length > 1 - ? context.isTablet + ? context.isTablet && GStorage.optTabletNav ? Column( children: [ SizedBox( diff --git a/lib/pages/setting/widgets/model.dart b/lib/pages/setting/widgets/model.dart index a81fddb9..40f82cdb 100644 --- a/lib/pages/setting/widgets/model.dart +++ b/lib/pages/setting/widgets/model.dart @@ -203,6 +203,14 @@ List get styleSettings => [ } }, ), + SettingsModel( + settingsType: SettingsType.sw1tch, + title: '优化平板导航栏', + leading: Icon(MdiIcons.soundbar), + setKey: SettingBoxKey.optTabletNav, + defaultVal: true, + needReboot: true, + ), SettingsModel( settingsType: SettingsType.sw1tch, title: 'MD3样式底栏', diff --git a/lib/utils/storage.dart b/lib/utils/storage.dart index 1c26481a..3e1c39a7 100644 --- a/lib/utils/storage.dart +++ b/lib/utils/storage.dart @@ -471,6 +471,9 @@ class GStorage { static num get maxCacheSize => GStorage.setting .get(SettingBoxKey.maxCacheSize, defaultValue: pow(1024, 3)); + static bool get optTabletNav => + GStorage.setting.get(SettingBoxKey.optTabletNav, defaultValue: true); + static List get dynamicDetailRatio => List.from(setting .get(SettingBoxKey.dynamicDetailRatio, defaultValue: [60.0, 40.0])); @@ -758,6 +761,7 @@ class SettingBoxKey { navSearchStreamDebounce = 'navSearchStreamDebounce', showPgcTimeline = 'showPgcTimeline', pageTransition = 'pageTransition', + optTabletNav = 'optTabletNav', // WebDAV webdavUri = 'webdavUri',