mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
@@ -8,6 +8,7 @@ import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/scale_app.dart';
|
||||
import 'package:PiliPlus/common/widgets/stateful_builder.dart';
|
||||
import 'package:PiliPlus/main.dart';
|
||||
import 'package:PiliPlus/models/common/bar_hide_type.dart';
|
||||
import 'package:PiliPlus/models/common/dynamic/dynamic_badge_mode.dart';
|
||||
import 'package:PiliPlus/models/common/dynamic/up_panel_position.dart';
|
||||
import 'package:PiliPlus/models/common/home_tab_type.dart';
|
||||
@@ -178,6 +179,12 @@ List<SettingsModel> get styleSettings => [
|
||||
getSubtitle: () =>
|
||||
'当前消息类型:${Pref.msgUnReadTypeV2.map((item) => item.title).join('、')}',
|
||||
),
|
||||
NormalModel(
|
||||
onTap: _showBarHideTypeDialog,
|
||||
title: '顶/底栏收起类型',
|
||||
leading: const Icon(MdiIcons.arrowExpandVertical),
|
||||
getSubtitle: () => '当前:${Pref.barHideType.label}',
|
||||
),
|
||||
SwitchModel(
|
||||
title: '首页顶栏收起',
|
||||
subtitle: '首页列表滑动时,收起顶栏',
|
||||
@@ -884,3 +891,22 @@ Future<void> _showDefHomeDialog(
|
||||
setState();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _showBarHideTypeDialog(
|
||||
BuildContext context,
|
||||
VoidCallback setState,
|
||||
) async {
|
||||
final res = await showDialog<BarHideType>(
|
||||
context: context,
|
||||
builder: (context) => SelectDialog<BarHideType>(
|
||||
title: '顶/底栏收起类型',
|
||||
value: Pref.barHideType,
|
||||
values: BarHideType.values.map((e) => (e, e.label)).toList(),
|
||||
),
|
||||
);
|
||||
if (res != null) {
|
||||
await GStorage.setting.put(SettingBoxKey.barHideType, res.index);
|
||||
SmartDialog.showToast('重启生效');
|
||||
setState();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user