diff --git a/lib/pages/dynamics/controller.dart b/lib/pages/dynamics/controller.dart index e849295ce..d8031306b 100644 --- a/lib/pages/dynamics/controller.dart +++ b/lib/pages/dynamics/controller.dart @@ -34,7 +34,7 @@ class DynamicsController extends GetxController int allFollowedUpsTotal = 0; late int currentMid = -1; - late bool showLiveItems = false; + late bool showLiveItems = GStorage.expandDynLivePanel; @override void onInit() { diff --git a/lib/pages/setting/widgets/model.dart b/lib/pages/setting/widgets/model.dart index 6bb493469..7280db4b9 100644 --- a/lib/pages/setting/widgets/model.dart +++ b/lib/pages/setting/widgets/model.dart @@ -258,6 +258,13 @@ List get styleSettings => [ setKey: SettingBoxKey.dynamicsShowAllFollowedUp, defaultVal: false, ), + SettingsModel( + settingsType: SettingsType.sw1tch, + title: '动态页展开正在直播UP列表', + leading: Icon(Icons.live_tv), + setKey: SettingBoxKey.expandDynLivePanel, + defaultVal: false, + ), SettingsModel( settingsType: SettingsType.normal, onTap: (setState) async { diff --git a/lib/utils/storage.dart b/lib/utils/storage.dart index abe27762a..fde6a6deb 100644 --- a/lib/utils/storage.dart +++ b/lib/utils/storage.dart @@ -384,6 +384,9 @@ class GStorage { static bool get antiGoodsReply => GStorage.setting.get(SettingBoxKey.antiGoodsReply, defaultValue: false); + static bool get expandDynLivePanel => GStorage.setting + .get(SettingBoxKey.expandDynLivePanel, defaultValue: false); + static List get dynamicDetailRatio => List.from(setting .get(SettingBoxKey.dynamicDetailRatio, defaultValue: [60.0, 40.0])); @@ -621,6 +624,7 @@ class SettingBoxKey { isPureBlackTheme = 'isPureBlackTheme', antiGoodsDyn = 'antiGoodsDyn', antiGoodsReply = 'antiGoodsReply', + expandDynLivePanel = 'expandDynLivePanel', // Sponsor Block enableSponsorBlock = 'enableSponsorBlock',