Skip to content

Commit

Permalink
ads: show less native ads
Browse files Browse the repository at this point in the history
  • Loading branch information
sstasi95 committed Feb 20, 2025
1 parent dd1ed0d commit 701532e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/src/services/ads_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class AdsServiceImpl with AppLogger implements AdsService {
final newNativeAds = <AdWithView>[];
final compl = Completer<List<AdWithView>>();

const adsCount = 3;
const adsCount = 1;

for (var i = 0; i < adsCount; i++) {
final nativeAd = NativeAd(
Expand Down Expand Up @@ -173,9 +173,8 @@ class AdsServiceImpl with AppLogger implements AdsService {
void _handleAdFailedToLoad(LoadAdError error, String adType) {
final errorCode = error.code;
final errorMessage = error.message;
final adNetwork = error.responseInfo?.adapterResponses?.firstOrNull?.adSourceInstanceName ?? 'unknown ad source';

final errorLog = '$adType ad failed to load: Code: $errorCode - Message: $errorMessage - Source: $adNetwork';
final errorLog = '$adType ad failed to load: Code: $errorCode - Message: $errorMessage';

if (_isNetworkError(errorMessage)) {
logDebug(errorLog);
Expand Down

0 comments on commit 701532e

Please sign in to comment.