Skip to content

Commit bd844ab

Browse files
committed
feat: Improve account action descriptions
- Updated link account descriptions - Updated upgrade account descriptions - Modified placeholder ad appearance
1 parent 159214e commit bd844ab

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

lib/shared/services/feed_injector_service.dart

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -133,30 +133,31 @@ class FeedInjectorService {
133133

134134
AccountAction _buildLinkAccountActionVariant(AppConfig appConfig) {
135135
final prefs = appConfig.userPreferenceLimits;
136-
final ads = appConfig.adConfig;
136+
// final prefs = appConfig.userPreferenceLimits; // Not using specific numbers
137+
// final ads = appConfig.adConfig; // Not using specific numbers
137138
final variant = _random.nextInt(3);
138139

139140
String title;
140141
String description;
141-
String ctaText = 'Learn More'; // Generic CTA
142+
String ctaText = 'Learn More';
142143

143144
switch (variant) {
144145
case 0:
145-
title = 'Unlock More Features!';
146+
title = 'Unlock Your Full Potential!';
146147
description =
147-
'Link your account to save up to ${prefs.authenticatedSavedHeadlinesLimit} headlines and follow ${prefs.authenticatedFollowedItemsLimit} topics. Plus, enjoy a less frequent ad experience!';
148+
'Link your account to enjoy expanded content access, keep your preferences synced, and experience a more streamlined ad display.';
148149
ctaText = 'Link Account & Explore';
149150
break;
150151
case 1:
151-
title = 'Keep Your Preferences Safe!';
152+
title = 'Personalize Your Experience!';
152153
description =
153-
'By linking your account, your followed items (up to ${prefs.authenticatedFollowedItemsLimit}) and saved articles (up to ${prefs.authenticatedSavedHeadlinesLimit}) are synced across devices.';
154+
'Secure your settings and reading history across all your devices by linking your account. Enjoy a tailored news journey!';
154155
ctaText = 'Secure My Preferences';
155156
break;
156157
default: // case 2
157-
title = 'Enhance Your News Journey!';
158+
title = 'Get More From Your News!';
158159
description =
159-
'Get more out of your feed. Link your account for higher content limits (save ${prefs.authenticatedSavedHeadlinesLimit}, follow ${prefs.authenticatedFollowedItemsLimit}) and see ads less often (currently every ${ads.guestAdFrequency} items, improves with linking).';
160+
'Link your account for enhanced content limits, better ad experiences, and ensure your preferences are always with you.';
160161
ctaText = 'Get Started';
161162
break;
162163
}
@@ -174,30 +175,31 @@ class FeedInjectorService {
174175

175176
AccountAction _buildUpgradeAccountActionVariant(AppConfig appConfig) {
176177
final prefs = appConfig.userPreferenceLimits;
177-
final ads = appConfig.adConfig;
178+
// final prefs = appConfig.userPreferenceLimits; // Not using specific numbers
179+
// final ads = appConfig.adConfig; // Not using specific numbers
178180
final variant = _random.nextInt(3);
179181

180182
String title;
181183
String description;
182-
String ctaText = 'Explore Premium'; // Generic CTA
184+
String ctaText = 'Explore Premium';
183185

184186
switch (variant) {
185187
case 0:
186-
title = 'Go Premium for the Ultimate Experience!';
188+
title = 'Unlock Our Best Features!';
187189
description =
188-
'Upgrade to enjoy an ad-free feed (or significantly fewer ads: ${ads.premiumAdFrequency} vs ${ads.authenticatedAdFrequency} items), save up to ${prefs.premiumSavedHeadlinesLimit} headlines, and follow ${prefs.premiumFollowedItemsLimit} interests!';
190+
'Go Premium to enjoy our most comprehensive content access, the best ad experience, and many more exclusive perks.';
189191
ctaText = 'Upgrade Now';
190192
break;
191193
case 1:
192-
title = 'Maximize Your Content Access!';
194+
title = 'Elevate Your News Consumption!';
193195
description =
194-
'With Premium, your limits expand! Follow ${prefs.premiumFollowedItemsLimit} sources/categories and save ${prefs.premiumSavedHeadlinesLimit} articles. Experience our best ad settings.';
196+
'With Premium, your content limits are greatly expanded and you will enjoy our most favorable ad settings. Discover the difference!';
195197
ctaText = 'Discover Premium Benefits';
196198
break;
197199
default: // case 2
198-
title = 'Tired of Ads? Want More Saves?';
200+
title = 'Want More Control & Fewer Interruptions?';
199201
description =
200-
'Upgrade to Premium for a superior ad experience (frequency: ${ads.premiumAdFrequency}) and massively increased limits: save ${prefs.premiumSavedHeadlinesLimit} headlines & follow ${prefs.premiumFollowedItemsLimit} items.';
202+
'Upgrade to Premium for a superior ad experience, massively increased content limits, and a more focused news journey.';
201203
ctaText = 'Yes, Upgrade Me!';
202204
break;
203205
}
@@ -213,17 +215,17 @@ class FeedInjectorService {
213215

214216
// Placeholder for _getAdToInject
215217
Ad? _getAdToInject() {
216-
// For now, return a placeholder Ad.
218+
// For now, return a placeholder Ad, always native.
217219
// In a real scenario, this would fetch from an ad network or predefined list.
218-
final adTypes = AdType.values;
219-
final adPlacements = AdPlacement.values;
220+
// final adPlacements = AdPlacement.values; // Can still use for variety if needed
220221

221222
return Ad(
222223
// id is generated by model if not provided
223-
imageUrl: 'https://via.placeholder.com/300x250.png/000000/FFFFFF?Text=Placeholder+Ad',
224+
imageUrl: 'https://via.placeholder.com/300x100.png/000000/FFFFFF?Text=Native+Placeholder+Ad', // Adjusted placeholder
224225
targetUrl: 'https://example.com/adtarget',
225-
adType: adTypes[_random.nextInt(adTypes.length)],
226-
placement: adPlacements[_random.nextInt(adPlacements.length)],
226+
adType: AdType.native, // Always native
227+
// Default placement or random from native-compatible placements
228+
placement: AdPlacement.feedInlineNativeBanner,
227229
);
228230
}
229231
}

0 commit comments

Comments
 (0)