Skip to content

Commit 0f5246e

Browse files
committed
fix(headline_actions): update headline reporting enabled check
- Use communityConfig.enabled to check if community feature is enabled - Only enable headline reporting if community feature is enabled and headlineReportingEnabled is true - Improve readability and maintainability of the code
1 parent 762e021 commit 0f5246e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/shared/widgets/headline_actions_bottom_sheet.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class _HeadlineActionsBottomSheetState
3838
);
3939

4040
final remoteConfig = context.watch<AppBloc>().state.remoteConfig;
41-
final isHeadlineReportingEnabled = remoteConfig
42-
?.features.community.reporting.headlineReportingEnabled ??
43-
false;
41+
final communityConfig = remoteConfig?.features.community;
42+
final isHeadlineReportingEnabled = (communityConfig?.enabled ?? false) &&
43+
(communityConfig?.reporting.headlineReportingEnabled ?? false);
4444

4545
return Wrap(
4646
children: [

0 commit comments

Comments
 (0)