Skip to content

Commit 7533803

Browse files
committed
refactor(local_ads_management): remove unused restoredLocalAd field
- Remove restoredLocalAd field from ArchiveLocalAdsState - Adjust copyWith method to remove restoredLocalAd parameter - Update ArchiveLocalAdsStateProps to exclude restoredLocalAd
1 parent 15daa19 commit 7533803

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/local_ads_management/bloc/archive_local_ads/archive_local_ads_state.dart

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class ArchiveLocalAdsState extends Equatable {
2929
this.videoAdsCursor,
3030
this.videoAdsHasMore = false,
3131
this.exception,
32-
this.restoredLocalAd,
3332
this.lastPendingDeletionId,
3433
this.snackbarLocalAdTitle,
3534
});
@@ -87,9 +86,6 @@ class ArchiveLocalAdsState extends Equatable {
8786
/// The error describing an operation failure, if any.
8887
final HttpException? exception;
8988

90-
/// The last restored local ad, used for triggering UI updates.
91-
final LocalAd? restoredLocalAd;
92-
9389
/// The ID of the local ad that was most recently added to pending deletions.
9490
/// Used to trigger the snackbar display.
9591
final String? lastPendingDeletionId;
@@ -118,7 +114,6 @@ class ArchiveLocalAdsState extends Equatable {
118114
String? videoAdsCursor,
119115
bool? videoAdsHasMore,
120116
HttpException? exception,
121-
LocalAd? restoredLocalAd,
122117
String? lastPendingDeletionId,
123118
String? snackbarLocalAdTitle,
124119
}) {
@@ -143,10 +138,9 @@ class ArchiveLocalAdsState extends Equatable {
143138
videoAds: videoAds ?? this.videoAds,
144139
videoAdsCursor: videoAdsCursor ?? this.videoAdsCursor,
145140
videoAdsHasMore: videoAdsHasMore ?? this.videoAdsHasMore,
146-
exception: exception ?? this.exception,
147-
restoredLocalAd: restoredLocalAd ?? this.restoredLocalAd,
141+
exception: exception,
148142
lastPendingDeletionId: lastPendingDeletionId ?? this.lastPendingDeletionId,
149-
snackbarLocalAdTitle: snackbarLocalAdTitle ?? this.snackbarLocalAdTitle,
143+
snackbarLocalAdTitle: snackbarLocalAdTitle,
150144
);
151145
}
152146

@@ -170,7 +164,6 @@ class ArchiveLocalAdsState extends Equatable {
170164
videoAdsCursor,
171165
videoAdsHasMore,
172166
exception,
173-
restoredLocalAd,
174167
lastPendingDeletionId,
175168
snackbarLocalAdTitle,
176169
];

0 commit comments

Comments
 (0)