Skip to content

Commit ab23ba8

Browse files
committed
refactor(local_ads_management): remove contentStatus from UpdateLocalVideoAdState
- Remove contentStatus field from UpdateLocalVideoAdState - Update isDirty getter to only compare videoUrl and targetUrl - Update copyWith method to exclude contentStatus - Remove contentStatus from props list
1 parent c7cc747 commit ab23ba8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_state.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ final class UpdateLocalVideoAdState extends Equatable {
2525
this.initialAd,
2626
this.videoUrl = '',
2727
this.targetUrl = '',
28-
this.contentStatus = ContentStatus.active,
2928
this.exception,
3029
this.updatedAd,
3130
});
@@ -34,7 +33,6 @@ final class UpdateLocalVideoAdState extends Equatable {
3433
final LocalVideoAd? initialAd;
3534
final String videoUrl;
3635
final String targetUrl;
37-
final ContentStatus contentStatus;
3836
final HttpException? exception;
3937
final LocalVideoAd? updatedAd;
4038

@@ -45,16 +43,13 @@ final class UpdateLocalVideoAdState extends Equatable {
4543
/// Returns true if there are changes compared to the initial ad.
4644
bool get isDirty =>
4745
initialAd != null &&
48-
(videoUrl != initialAd!.videoUrl ||
49-
targetUrl != initialAd!.targetUrl ||
50-
contentStatus != initialAd!.status);
46+
(videoUrl != initialAd!.videoUrl || targetUrl != initialAd!.targetUrl);
5147

5248
UpdateLocalVideoAdState copyWith({
5349
UpdateLocalVideoAdStatus? status,
5450
LocalVideoAd? initialAd,
5551
String? videoUrl,
5652
String? targetUrl,
57-
ContentStatus? contentStatus,
5853
HttpException? exception,
5954
LocalVideoAd? updatedAd,
6055
}) {
@@ -63,7 +58,6 @@ final class UpdateLocalVideoAdState extends Equatable {
6358
initialAd: initialAd ?? this.initialAd,
6459
videoUrl: videoUrl ?? this.videoUrl,
6560
targetUrl: targetUrl ?? this.targetUrl,
66-
contentStatus: contentStatus ?? this.contentStatus,
6761
exception: exception,
6862
updatedAd: updatedAd ?? this.updatedAd,
6963
);
@@ -75,7 +69,6 @@ final class UpdateLocalVideoAdState extends Equatable {
7569
initialAd,
7670
videoUrl,
7771
targetUrl,
78-
contentStatus,
7972
exception,
8073
updatedAd,
8174
];

0 commit comments

Comments
 (0)