Skip to content

Commit 15daa19

Browse files
committed
fix(ads): remove redundant state updates for restoredLocalAd
- Remove unnecessary `restoredLocalAd` updates in multiple states - This change simplifies the state management and improves performance
1 parent 2ae6ccd commit 15daa19

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/local_ads_management/bloc/archive_local_ads/archive_local_ads_bloc.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ class ArchiveLocalAdsBloc
313313
id: event.id,
314314
item: updatedAd,
315315
);
316-
emit(state.copyWith(restoredLocalAd: updatedAd));
317316
} on HttpException catch (e) {
318317
// Revert UI on failure
319318
switch (event.adType) {
@@ -519,7 +518,6 @@ class ArchiveLocalAdsBloc
519518
? null
520519
: state.lastPendingDeletionId,
521520
snackbarLocalAdTitle: null,
522-
restoredLocalAd: item,
523521
),
524522
);
525523
case 'banner':
@@ -532,7 +530,6 @@ class ArchiveLocalAdsBloc
532530
? null
533531
: state.lastPendingDeletionId,
534532
snackbarLocalAdTitle: null,
535-
restoredLocalAd: item,
536533
),
537534
);
538535
case 'interstitial':
@@ -546,7 +543,6 @@ class ArchiveLocalAdsBloc
546543
? null
547544
: state.lastPendingDeletionId,
548545
snackbarLocalAdTitle: null,
549-
restoredLocalAd: item,
550546
),
551547
);
552548
case 'video':
@@ -559,7 +555,6 @@ class ArchiveLocalAdsBloc
559555
? null
560556
: state.lastPendingDeletionId,
561557
snackbarLocalAdTitle: null,
562-
restoredLocalAd: item,
563558
),
564559
);
565560
}

0 commit comments

Comments
 (0)