Skip to content

Commit ffc0c65

Browse files
committed
refactor(app_configuration): improve ad settings UI and functionality
- Increase TabBarView height for better spacing - Replace CheckboxListTile with SwitchListTile for consistency - Update role visibility toggle label and logic
1 parent 1f8048b commit ffc0c65

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/app_configuration/widgets/feed_ad_settings_form.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class _FeedAdSettingsFormState extends State<FeedAdSettingsForm>
270270
),
271271
const SizedBox(height: AppSpacing.lg),
272272
SizedBox(
273-
height: 250,
273+
height: 350, // Increased height for better spacing
274274
child: TabBarView(
275275
controller: _tabController,
276276
children: AppUserRole.values
@@ -307,16 +307,17 @@ class _FeedAdSettingsFormState extends State<FeedAdSettingsForm>
307307

308308
return Column(
309309
children: [
310-
CheckboxListTile(
311-
title: Text(l10n.visibleToRoleLabel(role.l10n(context))),
310+
SwitchListTile(
311+
// Changed from CheckboxListTile to SwitchListTile for consistency
312+
title: Text(l10n.enableInArticleAdsForRoleLabel(role.l10n(context))),
312313
value: roleConfig != null && isEnabled,
313314
onChanged: isEnabled
314315
? (value) {
315316
final newVisibleTo =
316317
Map<AppUserRole, FeedAdFrequencyConfig>.from(
317318
config.visibleTo,
318319
);
319-
if (value ?? false) {
320+
if (value) {
320321
// Default values when enabling for a role
321322
newVisibleTo[role] = const FeedAdFrequencyConfig(
322323
adFrequency: 5,

0 commit comments

Comments
 (0)