mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: add expand dyn live panel option
Closes #302 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -258,6 +258,13 @@ List<SettingsModel> 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 {
|
||||
|
||||
@@ -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<double> get dynamicDetailRatio => List<double>.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',
|
||||
|
||||
Reference in New Issue
Block a user