Skip to content

Commit 77a6c60

Browse files
committed
fix(entity-details): update condition for source reporting enablement
- Refactor the logic to check if source reporting is enabled - Add communityConfig variable for better readability - Ensure community feature is enabled before checking source reporting
1 parent 0f5246e commit 77a6c60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/entity_details/view/entity_details_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ class _EntityDetailsViewState extends State<EntityDetailsView> {
108108
final textTheme = theme.textTheme;
109109
final colorScheme = theme.colorScheme;
110110
final remoteConfig = context.watch<AppBloc>().state.remoteConfig;
111-
final isSourceReportingEnabled =
112-
remoteConfig?.features.community.reporting.sourceReportingEnabled ??
113-
false;
111+
final communityConfig = remoteConfig?.features.community;
112+
final isSourceReportingEnabled = (communityConfig?.enabled ?? false) &&
113+
(communityConfig?.reporting.sourceReportingEnabled ?? false);
114114

115115
return Scaffold(
116116
body: BlocBuilder<EntityDetailsBloc, EntityDetailsState>(

0 commit comments

Comments
 (0)