chore: enable feature flags in settings (#4956)

This commit is contained in:
Lucas.Xu 2024-03-21 13:20:43 +07:00 committed by GitHub
parent 8c8be741b0
commit 40b710d140
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 13 deletions

View File

@ -13,9 +13,11 @@ class FeatureFlagsPage extends StatelessWidget {
return SingleChildScrollView(
child: SeparatedColumn(
children: [
...FeatureFlag.data.entries.map(
(e) => _FeatureFlagItem(featureFlag: e.key),
),
...FeatureFlag.data.entries
.where((e) => e.key != FeatureFlag.unknown)
.map(
(e) => _FeatureFlagItem(featureFlag: e.key),
),
FlowyTextButton(
'Restart the app to apply changes',
fontSize: 16.0,

View File

@ -4,7 +4,6 @@ import 'package:appflowy/workspace/application/settings/settings_dialog_bloc.dar
import 'package:appflowy/workspace/presentation/settings/widgets/settings_menu_element.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class SettingsMenu extends StatelessWidget {
@ -80,15 +79,16 @@ class SettingsMenu extends StatelessWidget {
icon: Icons.people,
changeSelectedPage: changeSelectedPage,
),
if (kDebugMode)
SettingsMenuElement(
// no need to translate this page
page: SettingsPage.featureFlags,
selectedPage: currentPage,
label: 'Feature Flags',
icon: Icons.flag,
changeSelectedPage: changeSelectedPage,
),
// enable in v0.5.3 temporarily
// if (kDebugMode)
SettingsMenuElement(
// no need to translate this page
page: SettingsPage.featureFlags,
selectedPage: currentPage,
label: 'Feature Flags',
icon: Icons.flag,
changeSelectedPage: changeSelectedPage,
),
],
),
);