From f3361412f8cae1275e9ceacafeafadde89d4bab2 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:35:07 +0100 Subject: [PATCH 01/32] refactor(local_ads_management): remove contentStatus from CreateLocalBannerAdState - Remove ContentStatus import - Remove contentStatus field from CreateLocalBannerAdState class - Remove contentStatus parameter from CreateLocalBannerAdState copyWith method - Update CreateLocalBannerAdState props to exclude contentStatus --- .../create_local_ads/create_local_banner_ad_state.dart | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_state.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_state.dart index 8a4e1c3a..b2c12c95 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_state.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_state.dart @@ -25,7 +25,6 @@ class CreateLocalBannerAdState extends Equatable { this.status = CreateLocalBannerAdStatus.initial, this.imageUrl = '', this.targetUrl = '', - this.contentStatus = ContentStatus.active, this.exception, this.createdLocalBannerAd, }); @@ -39,9 +38,6 @@ class CreateLocalBannerAdState extends Equatable { /// The target URL of the local banner ad. final String targetUrl; - /// The content status of the local banner ad. - final ContentStatus contentStatus; - /// The exception encountered during form submission, if any. final HttpException? exception; @@ -56,7 +52,6 @@ class CreateLocalBannerAdState extends Equatable { CreateLocalBannerAdStatus? status, String? imageUrl, String? targetUrl, - ContentStatus? contentStatus, HttpException? exception, LocalBannerAd? createdLocalBannerAd, }) { @@ -64,7 +59,6 @@ class CreateLocalBannerAdState extends Equatable { status: status ?? this.status, imageUrl: imageUrl ?? this.imageUrl, targetUrl: targetUrl ?? this.targetUrl, - contentStatus: contentStatus ?? this.contentStatus, exception: exception ?? this.exception, createdLocalBannerAd: createdLocalBannerAd ?? this.createdLocalBannerAd, ); @@ -75,7 +69,6 @@ class CreateLocalBannerAdState extends Equatable { status, imageUrl, targetUrl, - contentStatus, exception, createdLocalBannerAd, ]; From 183620a0a823bab68c30dbcf871707770ad4c8b4 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:35:18 +0100 Subject: [PATCH 02/32] refactor(local_ads_management): remove unused event class - Remove CreateLocalBannerAdStatusChanged event class - This class was likely made by accident or is no longer needed --- .../create_local_banner_ad_event.dart | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_event.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_event.dart index 7833369b..b2bf4abe 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_event.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_event.dart @@ -37,20 +37,6 @@ final class CreateLocalBannerAdTargetUrlChanged List get props => [targetUrl]; } -/// {@template create_local_banner_ad_status_changed} -/// Event to notify that the content status of the local banner ad has changed. -/// {@endtemplate} -final class CreateLocalBannerAdStatusChanged extends CreateLocalBannerAdEvent { - /// {@macro create_local_banner_ad_status_changed} - const CreateLocalBannerAdStatusChanged(this.status); - - /// The new content status. - final ContentStatus status; - - @override - List get props => [status]; -} - /// {@template create_local_banner_ad_submitted} /// Event to request submission of the new local banner ad. /// {@endtemplate} From b6a372ebd6d7cd5f235c392324b0e4684382310d Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:35:28 +0100 Subject: [PATCH 03/32] refactor(local_ads): remove status change logic in CreateLocalBannerAdBloc - Remove CreateLocalBannerAdStatusChanged event and related handler - Remove contentStatus from CreateLocalBannerAdState - Set status to active on local banner ad creation --- .../create_local_banner_ad_bloc.dart | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_bloc.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_bloc.dart index a90b42ce..c20e3985 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_bloc.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_banner_ad_bloc.dart @@ -17,7 +17,6 @@ class CreateLocalBannerAdBloc super(const CreateLocalBannerAdState()) { on(_onImageUrlChanged); on(_onTargetUrlChanged); - on(_onStatusChanged); on(_onSubmitted); } @@ -38,18 +37,6 @@ class CreateLocalBannerAdBloc emit(state.copyWith(targetUrl: event.targetUrl)); } - void _onStatusChanged( - CreateLocalBannerAdStatusChanged event, - Emitter emit, - ) { - emit( - state.copyWith( - contentStatus: event.status, - status: CreateLocalBannerAdStatus.initial, - ), - ); - } - Future _onSubmitted( CreateLocalBannerAdSubmitted event, Emitter emit, @@ -65,7 +52,7 @@ class CreateLocalBannerAdBloc targetUrl: state.targetUrl, createdAt: now, updatedAt: now, - status: state.contentStatus, + status: ContentStatus.active, // Set status to active on creation ); await _localAdsRepository.create(item: newLocalBannerAd); From ab94ad9633e40442f5fc1be5e05f92959c58dcda Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:35:39 +0100 Subject: [PATCH 04/32] refactor(local_ads_management): remove contentStatus from CreateLocalInterstitialAdState - Remove ContentStatus import - Remove contentStatus field from class properties - Exclude contentStatus from copyWith method - Remove contentStatus from equality check and toString method --- .../create_local_interstitial_ad_state.dart | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_state.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_state.dart index 0e66bb93..d21f6364 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_state.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_state.dart @@ -25,7 +25,6 @@ class CreateLocalInterstitialAdState extends Equatable { this.status = CreateLocalInterstitialAdStatus.initial, this.imageUrl = '', this.targetUrl = '', - this.contentStatus = ContentStatus.active, this.exception, this.createdLocalInterstitialAd, }); @@ -39,9 +38,6 @@ class CreateLocalInterstitialAdState extends Equatable { /// The target URL of the local interstitial ad. final String targetUrl; - /// The content status of the local interstitial ad. - final ContentStatus contentStatus; - /// The exception encountered during form submission, if any. final HttpException? exception; @@ -56,7 +52,6 @@ class CreateLocalInterstitialAdState extends Equatable { CreateLocalInterstitialAdStatus? status, String? imageUrl, String? targetUrl, - ContentStatus? contentStatus, HttpException? exception, LocalInterstitialAd? createdLocalInterstitialAd, }) { @@ -64,7 +59,6 @@ class CreateLocalInterstitialAdState extends Equatable { status: status ?? this.status, imageUrl: imageUrl ?? this.imageUrl, targetUrl: targetUrl ?? this.targetUrl, - contentStatus: contentStatus ?? this.contentStatus, exception: exception ?? this.exception, createdLocalInterstitialAd: createdLocalInterstitialAd ?? this.createdLocalInterstitialAd, @@ -76,7 +70,6 @@ class CreateLocalInterstitialAdState extends Equatable { status, imageUrl, targetUrl, - contentStatus, exception, createdLocalInterstitialAd, ]; From a8c5fec83cc99f8102610f712429f17b94eb3ab8 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:35:51 +0100 Subject: [PATCH 05/32] refactor(local_ads_management): remove unused event class - Remove CreateLocalInterstitialAdStatusChanged event class - This class was likely removed to clean up unused code and simplify the event structure for creating local interstitial ads --- .../create_local_interstitial_ad_event.dart | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_event.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_event.dart index 414d2477..63f2b287 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_event.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_event.dart @@ -37,21 +37,6 @@ final class CreateLocalInterstitialAdTargetUrlChanged List get props => [targetUrl]; } -/// {@template create_local_interstitial_ad_status_changed} -/// Event to notify that the content status of the local interstitial ad has changed. -/// {@endtemplate} -final class CreateLocalInterstitialAdStatusChanged - extends CreateLocalInterstitialAdEvent { - /// {@macro create_local_interstitial_ad_status_changed} - const CreateLocalInterstitialAdStatusChanged(this.status); - - /// The new content status. - final ContentStatus status; - - @override - List get props => [status]; -} - /// {@template create_local_interstitial_ad_submitted} /// Event to request submission of the new local interstitial ad. /// {@endtemplate} From 645af922ed98377e8314861c69e5fbebefbab013 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:36:08 +0100 Subject: [PATCH 06/32] refactor(local_ads_management): remove status change logic from interstitial ad creation - Remove CreateLocalInterstitialAdStatusChanged event and related handler - Remove contentStatus from CreateLocalInterstitialAdState - Set status to active by default when creating a new local interstitial ad --- .../create_local_interstitial_ad_bloc.dart | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_bloc.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_bloc.dart index 7dbc53a3..93c7bb63 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_bloc.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_bloc.dart @@ -18,7 +18,6 @@ class CreateLocalInterstitialAdBloc super(const CreateLocalInterstitialAdState()) { on(_onImageUrlChanged); on(_onTargetUrlChanged); - on(_onStatusChanged); on(_onSubmitted); } @@ -39,18 +38,6 @@ class CreateLocalInterstitialAdBloc emit(state.copyWith(targetUrl: event.targetUrl)); } - void _onStatusChanged( - CreateLocalInterstitialAdStatusChanged event, - Emitter emit, - ) { - emit( - state.copyWith( - contentStatus: event.status, - status: CreateLocalInterstitialAdStatus.initial, - ), - ); - } - Future _onSubmitted( CreateLocalInterstitialAdSubmitted event, Emitter emit, @@ -66,7 +53,7 @@ class CreateLocalInterstitialAdBloc targetUrl: state.targetUrl, createdAt: now, updatedAt: now, - status: state.contentStatus, + status: ContentStatus.active, // Set status to active on creation ); await _localAdsRepository.create(item: newLocalInterstitialAd); From 584cacdee440c88cd3c5c2c611c86468043c5455 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:36:20 +0100 Subject: [PATCH 07/32] refactor(local_ads_management): remove contentStatus from CreateLocalNativeAdState - Remove ContentStatus field from CreateLocalNativeAdState class - Remove contentStatus parameter from CreateLocalNativeAdState constructor - Remove contentStatus from copyWith method - Update props list to exclude contentStatus --- .../create_local_ads/create_local_native_ad_state.dart | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_state.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_state.dart index 9d835ec8..350b70a4 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_state.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_state.dart @@ -27,7 +27,6 @@ class CreateLocalNativeAdState extends Equatable { this.subtitle = '', this.imageUrl = '', this.targetUrl = '', - this.contentStatus = ContentStatus.active, this.exception, this.createdLocalNativeAd, }); @@ -47,9 +46,6 @@ class CreateLocalNativeAdState extends Equatable { /// The target URL of the local native ad. final String targetUrl; - /// The content status of the local native ad. - final ContentStatus contentStatus; - /// The exception encountered during form submission, if any. final HttpException? exception; @@ -70,7 +66,6 @@ class CreateLocalNativeAdState extends Equatable { String? subtitle, String? imageUrl, String? targetUrl, - ContentStatus? contentStatus, HttpException? exception, LocalNativeAd? createdLocalNativeAd, }) { @@ -80,7 +75,6 @@ class CreateLocalNativeAdState extends Equatable { subtitle: subtitle ?? this.subtitle, imageUrl: imageUrl ?? this.imageUrl, targetUrl: targetUrl ?? this.targetUrl, - contentStatus: contentStatus ?? this.contentStatus, exception: exception ?? this.exception, createdLocalNativeAd: createdLocalNativeAd ?? this.createdLocalNativeAd, ); @@ -93,7 +87,6 @@ class CreateLocalNativeAdState extends Equatable { subtitle, imageUrl, targetUrl, - contentStatus, exception, createdLocalNativeAd, ]; From e78cf1e1324ecb13bc534cf0f8c11ce9ba5d6d24 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:36:32 +0100 Subject: [PATCH 08/32] refactor(local_ads_management): remove unused event class - Remove CreateLocalNativeAdStatusChanged event class - This class was likely replaced by CreateLocalNativeAdContentStatusChanged --- .../create_local_native_ad_event.dart | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_event.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_event.dart index 51990a41..edbc2d68 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_event.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_event.dart @@ -66,20 +66,6 @@ final class CreateLocalNativeAdTargetUrlChanged List get props => [targetUrl]; } -/// {@template create_local_native_ad_status_changed} -/// Event to notify that the content status of the local native ad has changed. -/// {@endtemplate} -final class CreateLocalNativeAdStatusChanged extends CreateLocalNativeAdEvent { - /// {@macro create_local_native_ad_status_changed} - const CreateLocalNativeAdStatusChanged(this.status); - - /// The new content status. - final ContentStatus status; - - @override - List get props => [status]; -} - /// {@template create_local_native_ad_submitted} /// Event to request submission of the new local native ad. /// {@endtemplate} From 1d4b1cd11b6f505878e83ab73d4f93b33c41df6f Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:37:02 +0100 Subject: [PATCH 09/32] refactor(local_ads_management): remove status change logic from native ad creation - Remove CreateLocalNativeAdStatusChanged event and related handler - Remove contentStatus from CreateLocalNativeAdState - Set native ad status to active on creation instead of using variable --- .../create_local_native_ad_bloc.dart | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_bloc.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_bloc.dart index 501596a5..645e8618 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_bloc.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_native_ad_bloc.dart @@ -19,7 +19,6 @@ class CreateLocalNativeAdBloc on(_onSubtitleChanged); on(_onImageUrlChanged); on(_onTargetUrlChanged); - on(_onStatusChanged); on(_onSubmitted); } @@ -54,18 +53,6 @@ class CreateLocalNativeAdBloc emit(state.copyWith(targetUrl: event.targetUrl)); } - void _onStatusChanged( - CreateLocalNativeAdStatusChanged event, - Emitter emit, - ) { - emit( - state.copyWith( - contentStatus: event.status, - status: CreateLocalNativeAdStatus.initial, - ), - ); - } - Future _onSubmitted( CreateLocalNativeAdSubmitted event, Emitter emit, @@ -83,7 +70,7 @@ class CreateLocalNativeAdBloc targetUrl: state.targetUrl, createdAt: now, updatedAt: now, - status: state.contentStatus, + status: ContentStatus.active, // Set status to active on creation ); await _localAdsRepository.create(item: newLocalNativeAd); From 40a33064eade3bb165838eb3426a82c211ce8b5b Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:37:15 +0100 Subject: [PATCH 10/32] fix(local-ads): remove status toggle from local video ad creation - Remove CreateLocalVideoAdStatusChanged event handler - Remove status field from CreateLocalVideoAdState - Set default status to active when creating a new local video ad --- .../create_local_video_ad_bloc.dart | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_bloc.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_bloc.dart index ce57895c..93cc1d19 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_bloc.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_bloc.dart @@ -17,7 +17,6 @@ class CreateLocalVideoAdBloc super(const CreateLocalVideoAdState()) { on(_onVideoUrlChanged); on(_onTargetUrlChanged); - on(_onStatusChanged); on(_onSubmitted); } @@ -38,18 +37,6 @@ class CreateLocalVideoAdBloc emit(state.copyWith(targetUrl: event.targetUrl)); } - void _onStatusChanged( - CreateLocalVideoAdStatusChanged event, - Emitter emit, - ) { - emit( - state.copyWith( - contentStatus: event.status, - status: CreateLocalVideoAdStatus.initial, - ), - ); - } - Future _onSubmitted( CreateLocalVideoAdSubmitted event, Emitter emit, @@ -65,7 +52,7 @@ class CreateLocalVideoAdBloc targetUrl: state.targetUrl, createdAt: now, updatedAt: now, - status: state.contentStatus, + status: ContentStatus.active, // Set status to active on creation ); await _localAdsRepository.create(item: newLocalVideoAd); From b0b9bb804b83c2f8b21c88a9981943645f42b944 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:37:26 +0100 Subject: [PATCH 11/32] refactor(local_ads_management): remove unused event class - Remove CreateLocalVideoAdStatusChanged event class - This class was not in use and could potentially cause confusion --- .../create_local_video_ad_event.dart | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_event.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_event.dart index 916253c8..0d15bc5a 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_event.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_event.dart @@ -35,20 +35,6 @@ final class CreateLocalVideoAdTargetUrlChanged extends CreateLocalVideoAdEvent { List get props => [targetUrl]; } -/// {@template create_local_video_ad_status_changed} -/// Event to notify that the content status of the local video ad has changed. -/// {@endtemplate} -final class CreateLocalVideoAdStatusChanged extends CreateLocalVideoAdEvent { - /// {@macro create_local_video_ad_status_changed} - const CreateLocalVideoAdStatusChanged(this.status); - - /// The new content status. - final ContentStatus status; - - @override - List get props => [status]; -} - /// {@template create_local_video_ad_submitted} /// Event to request submission of the new local video ad. /// {@endtemplate} From c79a6951e61da56349d9ef8de55988c3f5c90377 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:37:42 +0100 Subject: [PATCH 12/32] refactor(local_ads_management): remove unused contentStatus from CreateLocalVideoAdState - Remove contentStatus property from CreateLocalVideoAdState class - Remove contentStatus parameter from CreateLocalVideoAdState copyWith method - Update CreateLocalVideoAdState props list to remove contentStatus --- .../bloc/create_local_ads/create_local_video_ad_state.dart | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_state.dart b/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_state.dart index b3f6e079..b68030fb 100644 --- a/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_state.dart +++ b/lib/local_ads_management/bloc/create_local_ads/create_local_video_ad_state.dart @@ -25,7 +25,6 @@ class CreateLocalVideoAdState extends Equatable { this.status = CreateLocalVideoAdStatus.initial, this.videoUrl = '', this.targetUrl = '', - this.contentStatus = ContentStatus.active, this.exception, this.createdLocalVideoAd, }); @@ -39,9 +38,6 @@ class CreateLocalVideoAdState extends Equatable { /// The target URL of the local video ad. final String targetUrl; - /// The content status of the local video ad. - final ContentStatus contentStatus; - /// The exception encountered during form submission, if any. final HttpException? exception; @@ -56,7 +52,6 @@ class CreateLocalVideoAdState extends Equatable { CreateLocalVideoAdStatus? status, String? videoUrl, String? targetUrl, - ContentStatus? contentStatus, HttpException? exception, LocalVideoAd? createdLocalVideoAd, }) { @@ -64,7 +59,6 @@ class CreateLocalVideoAdState extends Equatable { status: status ?? this.status, videoUrl: videoUrl ?? this.videoUrl, targetUrl: targetUrl ?? this.targetUrl, - contentStatus: contentStatus ?? this.contentStatus, exception: exception ?? this.exception, createdLocalVideoAd: createdLocalVideoAd ?? this.createdLocalVideoAd, ); @@ -75,7 +69,6 @@ class CreateLocalVideoAdState extends Equatable { status, videoUrl, targetUrl, - contentStatus, exception, createdLocalVideoAd, ]; From 4b6ff49b9f806e63a45baeed1c3cfe6fd5285d67 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:37:58 +0100 Subject: [PATCH 13/32] refactor(local_ads_management): remove contentStatus from UpdateLocalBannerAdState - Remove contentStatus property from UpdateLocalBannerAdState class - Update isDirty getter to only compare imageUrl and targetUrl - Adjust copyWith method to exclude contentStatus parameter - Remove contentStatus from the class constructor and props list --- .../update_local_ads/update_local_banner_ad_state.dart | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_state.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_state.dart index 3efd069b..70769281 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_state.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_state.dart @@ -25,7 +25,6 @@ final class UpdateLocalBannerAdState extends Equatable { this.initialAd, this.imageUrl = '', this.targetUrl = '', - this.contentStatus = ContentStatus.active, this.exception, this.updatedAd, }); @@ -34,7 +33,6 @@ final class UpdateLocalBannerAdState extends Equatable { final LocalBannerAd? initialAd; final String imageUrl; final String targetUrl; - final ContentStatus contentStatus; final HttpException? exception; final LocalBannerAd? updatedAd; @@ -45,16 +43,13 @@ final class UpdateLocalBannerAdState extends Equatable { /// Returns true if there are changes compared to the initial ad. bool get isDirty => initialAd != null && - (imageUrl != initialAd!.imageUrl || - targetUrl != initialAd!.targetUrl || - contentStatus != initialAd!.status); + (imageUrl != initialAd!.imageUrl || targetUrl != initialAd!.targetUrl); UpdateLocalBannerAdState copyWith({ UpdateLocalBannerAdStatus? status, LocalBannerAd? initialAd, String? imageUrl, String? targetUrl, - ContentStatus? contentStatus, HttpException? exception, LocalBannerAd? updatedAd, }) { @@ -63,7 +58,6 @@ final class UpdateLocalBannerAdState extends Equatable { initialAd: initialAd ?? this.initialAd, imageUrl: imageUrl ?? this.imageUrl, targetUrl: targetUrl ?? this.targetUrl, - contentStatus: contentStatus ?? this.contentStatus, exception: exception, updatedAd: updatedAd ?? this.updatedAd, ); @@ -75,7 +69,6 @@ final class UpdateLocalBannerAdState extends Equatable { initialAd, imageUrl, targetUrl, - contentStatus, exception, updatedAd, ]; From 93bc5dfb750acd2ec7672fb7cf8176a89c1a5944 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:38:08 +0100 Subject: [PATCH 14/32] refactor(local_ads_management): remove unused event class - Deleted the UpdateLocalBannerAdStatusChanged class from update_local_banner_ad_event.dart - This class was likely made obsolete by a recent change in the app's architecture --- .../update_local_banner_ad_event.dart | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_event.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_event.dart index 1972e6a0..4a370975 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_event.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_event.dart @@ -51,20 +51,6 @@ final class UpdateLocalBannerAdTargetUrlChanged List get props => [targetUrl]; } -/// {@template update_local_banner_ad_status_changed} -/// Event to notify that the content status of the local banner ad has changed. -/// {@endtemplate} -final class UpdateLocalBannerAdStatusChanged extends UpdateLocalBannerAdEvent { - /// {@macro update_local_banner_ad_status_changed} - const UpdateLocalBannerAdStatusChanged(this.status); - - /// The new content status. - final ContentStatus status; - - @override - List get props => [status]; -} - /// {@template update_local_banner_ad_submitted} /// Event to request submission of the updated local banner ad. /// {@endtemplate} From 2b3ed030a913f33c18fc30baf3a853c1d8fec967 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:38:37 +0100 Subject: [PATCH 15/32] fix(local-ads): remove status update functionality from local banner ad - Remove status change event and related logic from UpdateLocalBannerAdBloc - Ensure original status is maintained when submitting ad updates - Update state management to reflect removal of contentStatus --- .../update_local_ads/update_local_banner_ad_bloc.dart | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_bloc.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_bloc.dart index f5165788..0702b979 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_bloc.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_banner_ad_bloc.dart @@ -21,7 +21,6 @@ class UpdateLocalBannerAdBloc on(_onLoaded); on(_onImageUrlChanged); on(_onTargetUrlChanged); - on(_onStatusChanged); on(_onSubmitted); add(UpdateLocalBannerAdLoaded(_id)); @@ -44,7 +43,6 @@ class UpdateLocalBannerAdBloc initialAd: localBannerAd, imageUrl: localBannerAd.imageUrl, targetUrl: localBannerAd.targetUrl, - contentStatus: localBannerAd.status, ), ); } on HttpException catch (e) { @@ -75,13 +73,6 @@ class UpdateLocalBannerAdBloc emit(state.copyWith(targetUrl: event.targetUrl)); } - void _onStatusChanged( - UpdateLocalBannerAdStatusChanged event, - Emitter emit, - ) { - emit(state.copyWith(contentStatus: event.status)); - } - Future _onSubmitted( UpdateLocalBannerAdSubmitted event, Emitter emit, @@ -95,7 +86,7 @@ class UpdateLocalBannerAdBloc imageUrl: state.imageUrl, targetUrl: state.targetUrl, updatedAt: now, - status: state.contentStatus, + status: state.initialAd!.status, // Maintain original status ); await _localAdsRepository.update( From d8e58159a792dfccad190b0008175a08603509a2 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:38:49 +0100 Subject: [PATCH 16/32] fix(local-ads): remove status update functionality from interstitial ad - Remove status change event and method from UpdateLocalInterstitialAdBloc - Update ad submission to maintain original status instead of allowing changes - Remove status field from UpdateLocalInterstitialAdState --- .../update_local_interstitial_ad_bloc.dart | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_bloc.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_bloc.dart index 706f964b..d7b2b522 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_bloc.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_bloc.dart @@ -22,7 +22,6 @@ class UpdateLocalInterstitialAdBloc on(_onLoaded); on(_onImageUrlChanged); on(_onTargetUrlChanged); - on(_onStatusChanged); on(_onSubmitted); add(UpdateLocalInterstitialAdLoaded(_id)); @@ -45,7 +44,6 @@ class UpdateLocalInterstitialAdBloc initialAd: localInterstitialAd, imageUrl: localInterstitialAd.imageUrl, targetUrl: localInterstitialAd.targetUrl, - contentStatus: localInterstitialAd.status, ), ); } on HttpException catch (e) { @@ -79,13 +77,6 @@ class UpdateLocalInterstitialAdBloc emit(state.copyWith(targetUrl: event.targetUrl)); } - void _onStatusChanged( - UpdateLocalInterstitialAdStatusChanged event, - Emitter emit, - ) { - emit(state.copyWith(contentStatus: event.status)); - } - Future _onSubmitted( UpdateLocalInterstitialAdSubmitted event, Emitter emit, @@ -99,7 +90,7 @@ class UpdateLocalInterstitialAdBloc imageUrl: state.imageUrl, targetUrl: state.targetUrl, updatedAt: now, - status: state.contentStatus, + status: state.initialAd!.status, // Maintain original status ); await _localAdsRepository.update( From 690225bdaad737ed86709221c6753dc55f6eae00 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:38:59 +0100 Subject: [PATCH 17/32] refactor(local_ads_management): remove unused event class - Remove UpdateLocalInterstitialAdStatusChanged event class - This class was likely made obsolete by a previous commit that introduced UpdateLocalAdStatusChanged and replaced all usages of the former with the latter, except for the actual declaration of the former --- .../update_local_interstitial_ad_event.dart | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_event.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_event.dart index ca70b457..98e08feb 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_event.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_event.dart @@ -52,21 +52,6 @@ final class UpdateLocalInterstitialAdTargetUrlChanged List get props => [targetUrl]; } -/// {@template update_local_interstitial_ad_status_changed} -/// Event to notify that the content status of the local interstitial ad has changed. -/// {@endtemplate} -final class UpdateLocalInterstitialAdStatusChanged - extends UpdateLocalInterstitialAdEvent { - /// {@macro update_local_interstitial_ad_status_changed} - const UpdateLocalInterstitialAdStatusChanged(this.status); - - /// The new content status. - final ContentStatus status; - - @override - List get props => [status]; -} - /// {@template update_local_interstitial_ad_submitted} /// Event to request submission of the updated local interstitial ad. /// {@endtemplate} From c0eb8b5f09f0b2fc7e53fbdb73962d2d86787107 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:40:03 +0100 Subject: [PATCH 18/32] refactor(local_ads_management): remove unused contentStatus from UpdateLocalInterstitialAdState - Remove contentStatus field from UpdateLocalInterstitialAdState - Remove contentStatus from the constructor - Update isDirty getter to exclude contentStatus check - Remove contentStatus from copyWith method - Remove contentStatus from the props list --- .../update_local_interstitial_ad_state.dart | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_state.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_state.dart index 001be9d8..c572ea5c 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_state.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_state.dart @@ -25,7 +25,6 @@ final class UpdateLocalInterstitialAdState extends Equatable { this.initialAd, this.imageUrl = '', this.targetUrl = '', - this.contentStatus = ContentStatus.active, this.exception, this.updatedAd, }); @@ -34,7 +33,6 @@ final class UpdateLocalInterstitialAdState extends Equatable { final LocalInterstitialAd? initialAd; final String imageUrl; final String targetUrl; - final ContentStatus contentStatus; final HttpException? exception; final LocalInterstitialAd? updatedAd; @@ -45,16 +43,13 @@ final class UpdateLocalInterstitialAdState extends Equatable { /// Returns true if there are changes compared to the initial ad. bool get isDirty => initialAd != null && - (imageUrl != initialAd!.imageUrl || - targetUrl != initialAd!.targetUrl || - contentStatus != initialAd!.status); + (imageUrl != initialAd!.imageUrl || targetUrl != initialAd!.targetUrl); UpdateLocalInterstitialAdState copyWith({ UpdateLocalInterstitialAdStatus? status, LocalInterstitialAd? initialAd, String? imageUrl, String? targetUrl, - ContentStatus? contentStatus, HttpException? exception, LocalInterstitialAd? updatedAd, }) { @@ -63,7 +58,6 @@ final class UpdateLocalInterstitialAdState extends Equatable { initialAd: initialAd ?? this.initialAd, imageUrl: imageUrl ?? this.imageUrl, targetUrl: targetUrl ?? this.targetUrl, - contentStatus: contentStatus ?? this.contentStatus, exception: exception, updatedAd: updatedAd ?? this.updatedAd, ); @@ -75,7 +69,6 @@ final class UpdateLocalInterstitialAdState extends Equatable { initialAd, imageUrl, targetUrl, - contentStatus, exception, updatedAd, ]; From f0531cc866413998c19b898ca80dcfafecba2a98 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:40:16 +0100 Subject: [PATCH 19/32] fix(local_ads_management): remove unused status field and logic - Remove UpdateLocalNativeAdStatusChanged event handler - Remove contentStatus from UpdateLocalNativeAdState - Keep original status when submitting updated ad - Remove unused status input from update_local_native_ad_form.dart --- .../update_local_ads/update_local_native_ad_bloc.dart | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_bloc.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_bloc.dart index 241439f8..28f696f6 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_bloc.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_bloc.dart @@ -23,7 +23,6 @@ class UpdateLocalNativeAdBloc on(_onSubtitleChanged); on(_onImageUrlChanged); on(_onTargetUrlChanged); - on(_onStatusChanged); on(_onSubmitted); add(UpdateLocalNativeAdLoaded(_id)); @@ -48,7 +47,6 @@ class UpdateLocalNativeAdBloc subtitle: localNativeAd.subtitle, imageUrl: localNativeAd.imageUrl, targetUrl: localNativeAd.targetUrl, - contentStatus: localNativeAd.status, ), ); } on HttpException catch (e) { @@ -93,13 +91,6 @@ class UpdateLocalNativeAdBloc emit(state.copyWith(targetUrl: event.targetUrl)); } - void _onStatusChanged( - UpdateLocalNativeAdStatusChanged event, - Emitter emit, - ) { - emit(state.copyWith(contentStatus: event.status)); - } - Future _onSubmitted( UpdateLocalNativeAdSubmitted event, Emitter emit, @@ -115,7 +106,7 @@ class UpdateLocalNativeAdBloc imageUrl: state.imageUrl, targetUrl: state.targetUrl, updatedAt: now, - status: state.contentStatus, + status: state.initialAd!.status, // Maintain original status ); await _localAdsRepository.update( From 6f19292ada98c4309541844e4007a9170c1666bc Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:40:38 +0100 Subject: [PATCH 20/32] refactor(local_ads_management): remove unused event class - Remove UpdateLocalNativeAdStatusChanged event class - This class was likely replaced by DirectContentStatusChanged event in a previous commit --- .../update_local_native_ad_event.dart | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_event.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_event.dart index 06a07bde..11f5fefe 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_event.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_event.dart @@ -80,20 +80,6 @@ final class UpdateLocalNativeAdTargetUrlChanged List get props => [targetUrl]; } -/// {@template update_local_native_ad_status_changed} -/// Event to notify that the content status of the local native ad has changed. -/// {@endtemplate} -final class UpdateLocalNativeAdStatusChanged extends UpdateLocalNativeAdEvent { - /// {@macro update_local_native_ad_status_changed} - const UpdateLocalNativeAdStatusChanged(this.status); - - /// The new content status. - final ContentStatus status; - - @override - List get props => [status]; -} - /// {@template update_local_native_ad_submitted} /// Event to request submission of the updated local native ad. /// {@endtemplate} From 224293dc2eff12cc6e12fb0a9c51fcc373f838c5 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:40:47 +0100 Subject: [PATCH 21/32] refactor(local_ads_management): remove contentStatus from UpdateLocalNativeAdState - Remove contentStatus property from UpdateLocalNativeAdState class - Remove contentStatus from the copyWith method - Remove contentStatus from the equality check - Remove contentStatus from the class properties list --- .../update_local_ads/update_local_native_ad_state.dart | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_state.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_state.dart index 99b0b8a5..d8df0932 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_state.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_native_ad_state.dart @@ -27,7 +27,6 @@ final class UpdateLocalNativeAdState extends Equatable { this.subtitle = '', this.imageUrl = '', this.targetUrl = '', - this.contentStatus = ContentStatus.active, this.exception, this.updatedAd, }); @@ -38,7 +37,6 @@ final class UpdateLocalNativeAdState extends Equatable { final String subtitle; final String imageUrl; final String targetUrl; - final ContentStatus contentStatus; final HttpException? exception; final LocalNativeAd? updatedAd; @@ -56,8 +54,7 @@ final class UpdateLocalNativeAdState extends Equatable { (title != initialAd!.title || subtitle != initialAd!.subtitle || imageUrl != initialAd!.imageUrl || - targetUrl != initialAd!.targetUrl || - contentStatus != initialAd!.status); + targetUrl != initialAd!.targetUrl); UpdateLocalNativeAdState copyWith({ UpdateLocalNativeAdStatus? status, @@ -66,7 +63,6 @@ final class UpdateLocalNativeAdState extends Equatable { String? subtitle, String? imageUrl, String? targetUrl, - ContentStatus? contentStatus, HttpException? exception, LocalNativeAd? updatedAd, }) { @@ -77,7 +73,6 @@ final class UpdateLocalNativeAdState extends Equatable { subtitle: subtitle ?? this.subtitle, imageUrl: imageUrl ?? this.imageUrl, targetUrl: targetUrl ?? this.targetUrl, - contentStatus: contentStatus ?? this.contentStatus, exception: exception, updatedAd: updatedAd ?? this.updatedAd, ); @@ -91,7 +86,6 @@ final class UpdateLocalNativeAdState extends Equatable { subtitle, imageUrl, targetUrl, - contentStatus, exception, updatedAd, ]; From 6ad041135a6263b2b81abd035ba2320cb0b0e79b Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:40:54 +0100 Subject: [PATCH 22/32] fix(local-ads): prevent status modification during local video ad update - Remove status update functionality from UpdateLocalVideoAdBloc - Maintain original status when submitting updated ad - Remove related UI components for status display and update --- .../update_local_ads/update_local_video_ad_bloc.dart | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_bloc.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_bloc.dart index df29cfe3..c99ecd69 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_bloc.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_bloc.dart @@ -21,7 +21,6 @@ class UpdateLocalVideoAdBloc on(_onLoaded); on(_onVideoUrlChanged); on(_onTargetUrlChanged); - on(_onStatusChanged); on(_onSubmitted); add(UpdateLocalVideoAdLoaded(_id)); @@ -44,7 +43,6 @@ class UpdateLocalVideoAdBloc initialAd: localVideoAd, videoUrl: localVideoAd.videoUrl, targetUrl: localVideoAd.targetUrl, - contentStatus: localVideoAd.status, ), ); } on HttpException catch (e) { @@ -75,13 +73,6 @@ class UpdateLocalVideoAdBloc emit(state.copyWith(targetUrl: event.targetUrl)); } - void _onStatusChanged( - UpdateLocalVideoAdStatusChanged event, - Emitter emit, - ) { - emit(state.copyWith(contentStatus: event.status)); - } - Future _onSubmitted( UpdateLocalVideoAdSubmitted event, Emitter emit, @@ -95,7 +86,7 @@ class UpdateLocalVideoAdBloc videoUrl: state.videoUrl, targetUrl: state.targetUrl, updatedAt: now, - status: state.contentStatus, + status: state.initialAd!.status, // Maintain original status ); await _localAdsRepository.update( From c7cc747f78118cd1b46a1bf5c35853ea92b15cf7 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:41:09 +0100 Subject: [PATCH 23/32] refactor(local_ads_management): remove unused event class - Remove UpdateLocalVideoAdStatusChanged event class - This class was not being used in the bloc and could potentially cause confusion - Its functionality can be handled by the existing UpdateLocalVideoAdContentStatusChanged event --- .../update_local_video_ad_event.dart | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_event.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_event.dart index 14c1cdc4..43c1e2d8 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_event.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_event.dart @@ -49,20 +49,6 @@ final class UpdateLocalVideoAdTargetUrlChanged extends UpdateLocalVideoAdEvent { List get props => [targetUrl]; } -/// {@template update_local_video_ad_status_changed} -/// Event to notify that the content status of the local video ad has changed. -/// {@endtemplate} -final class UpdateLocalVideoAdStatusChanged extends UpdateLocalVideoAdEvent { - /// {@macro update_local_video_ad_status_changed} - const UpdateLocalVideoAdStatusChanged(this.status); - - /// The new content status. - final ContentStatus status; - - @override - List get props => [status]; -} - /// {@template update_local_video_ad_submitted} /// Event to request submission of the updated local video ad. /// {@endtemplate} From ab23ba86068479d7430ba453a91dab137e94b3af Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:41:18 +0100 Subject: [PATCH 24/32] 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 --- .../update_local_ads/update_local_video_ad_state.dart | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_state.dart b/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_state.dart index 21daa8f9..263ea0fa 100644 --- a/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_state.dart +++ b/lib/local_ads_management/bloc/update_local_ads/update_local_video_ad_state.dart @@ -25,7 +25,6 @@ final class UpdateLocalVideoAdState extends Equatable { this.initialAd, this.videoUrl = '', this.targetUrl = '', - this.contentStatus = ContentStatus.active, this.exception, this.updatedAd, }); @@ -34,7 +33,6 @@ final class UpdateLocalVideoAdState extends Equatable { final LocalVideoAd? initialAd; final String videoUrl; final String targetUrl; - final ContentStatus contentStatus; final HttpException? exception; final LocalVideoAd? updatedAd; @@ -45,16 +43,13 @@ final class UpdateLocalVideoAdState extends Equatable { /// Returns true if there are changes compared to the initial ad. bool get isDirty => initialAd != null && - (videoUrl != initialAd!.videoUrl || - targetUrl != initialAd!.targetUrl || - contentStatus != initialAd!.status); + (videoUrl != initialAd!.videoUrl || targetUrl != initialAd!.targetUrl); UpdateLocalVideoAdState copyWith({ UpdateLocalVideoAdStatus? status, LocalVideoAd? initialAd, String? videoUrl, String? targetUrl, - ContentStatus? contentStatus, HttpException? exception, LocalVideoAd? updatedAd, }) { @@ -63,7 +58,6 @@ final class UpdateLocalVideoAdState extends Equatable { initialAd: initialAd ?? this.initialAd, videoUrl: videoUrl ?? this.videoUrl, targetUrl: targetUrl ?? this.targetUrl, - contentStatus: contentStatus ?? this.contentStatus, exception: exception, updatedAd: updatedAd ?? this.updatedAd, ); @@ -75,7 +69,6 @@ final class UpdateLocalVideoAdState extends Equatable { initialAd, videoUrl, targetUrl, - contentStatus, exception, updatedAd, ]; From dc2460852d748cc44bfcb5e41b160df1d824a504 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:41:29 +0100 Subject: [PATCH 25/32] refactor(local_ads_management): remove content status selection input - Remove SearchableSelectionInput widget for ContentStatus - Remove unused imports related to ContentStatusL10n and SearchableSelectionInput --- .../view/create_local_banner_ad_page.dart | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/local_ads_management/view/create_local_banner_ad_page.dart b/lib/local_ads_management/view/create_local_banner_ad_page.dart index 1fd0404a..d8cb5228 100644 --- a/lib/local_ads_management/view/create_local_banner_ad_page.dart +++ b/lib/local_ads_management/view/create_local_banner_ad_page.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/bloc/create_local_ads/create_local_banner_ad_bloc.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/content_status_l10n.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/widgets/searchable_selection_input.dart'; import 'package:go_router/go_router.dart'; import 'package:ui_kit/ui_kit.dart'; @@ -143,20 +141,6 @@ class _CreateLocalBannerAdViewState extends State<_createlocalbanneradview> { .add(CreateLocalBannerAdTargetUrlChanged(value)), ), const SizedBox(height: AppSpacing.lg), - SearchableSelectionInput( - label: l10n.status, - selectedItem: state.contentStatus, - staticItems: ContentStatus.values.toList(), - itemBuilder: (context, status) => - Text(status.l10n(context)), - itemToString: (status) => status.l10n(context), - onChanged: (value) { - if (value == null) return; - context.read().add( - CreateLocalBannerAdStatusChanged(value), - ); - }, - ), ], ), ), From ba68690c22709e67a737bdfda9c93469f1f0028a Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:41:44 +0100 Subject: [PATCH 26/32] refactor(local_ads_management): remove status selection input - Remove SearchableSelectionInput widget for ContentStatus - Delete unused imports related to ContentStatus and localization --- .../view/create_local_interstitial_ad_page.dart | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/local_ads_management/view/create_local_interstitial_ad_page.dart b/lib/local_ads_management/view/create_local_interstitial_ad_page.dart index bb9fc957..2ae3f69f 100644 --- a/lib/local_ads_management/view/create_local_interstitial_ad_page.dart +++ b/lib/local_ads_management/view/create_local_interstitial_ad_page.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/bloc/create_local_ads/create_local_interstitial_ad_bloc.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/content_status_l10n.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/widgets/searchable_selection_input.dart'; import 'package:go_router/go_router.dart'; import 'package:ui_kit/ui_kit.dart'; @@ -162,20 +160,6 @@ class _CreateLocalInterstitialAdViewState ), ), const SizedBox(height: AppSpacing.lg), - SearchableSelectionInput( - label: l10n.status, - selectedItem: state.contentStatus, - staticItems: ContentStatus.values.toList(), - itemBuilder: (context, status) => - Text(status.l10n(context)), - itemToString: (status) => status.l10n(context), - onChanged: (value) { - if (value == null) return; - context.read().add( - CreateLocalInterstitialAdStatusChanged(value), - ); - }, - ), ], ), ), From 3ba7f494cd47cabe50fbb16b7dccfb9f7e335815 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:42:04 +0100 Subject: [PATCH 27/32] refactor(local_ads_management): remove content status selection input - Remove unused import statements for ContentStatusL10n and SearchableSelectionInput - Remove ContentStatus selection input from the create local native ad form --- .../view/create_local_native_ad_page.dart | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/local_ads_management/view/create_local_native_ad_page.dart b/lib/local_ads_management/view/create_local_native_ad_page.dart index 73661c51..9d4edba6 100644 --- a/lib/local_ads_management/view/create_local_native_ad_page.dart +++ b/lib/local_ads_management/view/create_local_native_ad_page.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/bloc/create_local_ads/create_local_native_ad_bloc.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/content_status_l10n.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/widgets/searchable_selection_input.dart'; import 'package:go_router/go_router.dart'; import 'package:ui_kit/ui_kit.dart'; @@ -172,20 +170,6 @@ class _CreateLocalNativeAdViewState extends State<_createlocalnativeadview> { .add(CreateLocalNativeAdTargetUrlChanged(value)), ), const SizedBox(height: AppSpacing.lg), - SearchableSelectionInput( - label: l10n.status, - selectedItem: state.contentStatus, - staticItems: ContentStatus.values.toList(), - itemBuilder: (context, status) => - Text(status.l10n(context)), - itemToString: (status) => status.l10n(context), - onChanged: (value) { - if (value == null) return; - context.read().add( - CreateLocalNativeAdStatusChanged(value), - ); - }, - ), ], ), ), From e90ba8d75e5faa0e0dd39822eaf987e2e02d2cf3 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:42:30 +0100 Subject: [PATCH 28/32] refactor(local_ads_management): remove status selection input - Remove SearchableSelectionInput widget for ContentStatus - Remove unused imports related to ContentStatus and localization --- .../view/create_local_video_ad_page.dart | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/local_ads_management/view/create_local_video_ad_page.dart b/lib/local_ads_management/view/create_local_video_ad_page.dart index 435bd454..f6dcc553 100644 --- a/lib/local_ads_management/view/create_local_video_ad_page.dart +++ b/lib/local_ads_management/view/create_local_video_ad_page.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/bloc/create_local_ads/create_local_video_ad_bloc.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/content_status_l10n.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/widgets/searchable_selection_input.dart'; import 'package:go_router/go_router.dart'; import 'package:ui_kit/ui_kit.dart'; @@ -143,20 +141,6 @@ class _CreateLocalVideoAdViewState extends State<_createlocalvideoadview> { .add(CreateLocalVideoAdTargetUrlChanged(value)), ), const SizedBox(height: AppSpacing.lg), - SearchableSelectionInput( - label: l10n.status, - selectedItem: state.contentStatus, - staticItems: ContentStatus.values.toList(), - itemBuilder: (context, status) => - Text(status.l10n(context)), - itemToString: (status) => status.l10n(context), - onChanged: (value) { - if (value == null) return; - context.read().add( - CreateLocalVideoAdStatusChanged(value), - ); - }, - ), ], ), ), From 82112ba82b7510c954112940dc6407f6e520b148 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:42:39 +0100 Subject: [PATCH 29/32] refactor(local_ads_management): remove status selection input - Remove SearchableSelectionInput widget for ContentStatus - Remove unused imports related to ContentStatusL10n - Adjust layout by removing SizedBox after removed widget --- .../view/edit_local_banner_ad_page.dart | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/local_ads_management/view/edit_local_banner_ad_page.dart b/lib/local_ads_management/view/edit_local_banner_ad_page.dart index efd62dbd..189776ab 100644 --- a/lib/local_ads_management/view/edit_local_banner_ad_page.dart +++ b/lib/local_ads_management/view/edit_local_banner_ad_page.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/bloc/update_local_ads/update_local_banner_ad_bloc.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/content_status_l10n.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/widgets/searchable_selection_input.dart'; import 'package:go_router/go_router.dart'; import 'package:ui_kit/ui_kit.dart'; @@ -176,20 +174,6 @@ class _EditLocalBannerAdViewState extends State<_editlocalbanneradview> { .add(UpdateLocalBannerAdTargetUrlChanged(value)), ), const SizedBox(height: AppSpacing.lg), - SearchableSelectionInput( - label: l10n.status, - selectedItem: state.contentStatus, - staticItems: ContentStatus.values.toList(), - itemBuilder: (context, status) => - Text(status.l10n(context)), - itemToString: (status) => status.l10n(context), - onChanged: (value) { - if (value == null) return; - context.read().add( - UpdateLocalBannerAdStatusChanged(value), - ); - }, - ), ], ), ), From 9956a0aec9f0c646a294315e36fb24a0037ae497 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:43:01 +0100 Subject: [PATCH 30/32] refactor(local_ads_management): remove content status selection input - Remove SearchableSelectionInput widget for ContentStatus - Remove unused imports related to ContentStatus localization and widget --- .../view/edit_local_interstitial_ad_page.dart | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/local_ads_management/view/edit_local_interstitial_ad_page.dart b/lib/local_ads_management/view/edit_local_interstitial_ad_page.dart index 153576c0..4fcd5ff4 100644 --- a/lib/local_ads_management/view/edit_local_interstitial_ad_page.dart +++ b/lib/local_ads_management/view/edit_local_interstitial_ad_page.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/bloc/update_local_ads/update_local_interstitial_ad_bloc.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/content_status_l10n.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/widgets/searchable_selection_input.dart'; import 'package:go_router/go_router.dart'; import 'package:ui_kit/ui_kit.dart'; @@ -195,20 +193,6 @@ class _EditLocalInterstitialAdViewState ), ), const SizedBox(height: AppSpacing.lg), - SearchableSelectionInput( - label: l10n.status, - selectedItem: state.contentStatus, - staticItems: ContentStatus.values.toList(), - itemBuilder: (context, status) => - Text(status.l10n(context)), - itemToString: (status) => status.l10n(context), - onChanged: (value) { - if (value == null) return; - context.read().add( - UpdateLocalInterstitialAdStatusChanged(value), - ); - }, - ), ], ), ), From 9cc80066fa1fb3af56a588a6879b818ddcefe1f2 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:43:08 +0100 Subject: [PATCH 31/32] refactor(local_ads_management): remove status selection input - Remove SearchableSelectionInput widget for ContentStatus - Remove unused imports related to ContentStatusL10n --- .../view/edit_local_native_ad_page.dart | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/local_ads_management/view/edit_local_native_ad_page.dart b/lib/local_ads_management/view/edit_local_native_ad_page.dart index fdead6c2..85fbe0d7 100644 --- a/lib/local_ads_management/view/edit_local_native_ad_page.dart +++ b/lib/local_ads_management/view/edit_local_native_ad_page.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/bloc/update_local_ads/update_local_native_ad_bloc.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/content_status_l10n.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/widgets/searchable_selection_input.dart'; import 'package:go_router/go_router.dart'; import 'package:ui_kit/ui_kit.dart'; @@ -205,20 +203,6 @@ class _EditLocalNativeAdViewState extends State<_editlocalnativeadview> { .add(UpdateLocalNativeAdTargetUrlChanged(value)), ), const SizedBox(height: AppSpacing.lg), - SearchableSelectionInput( - label: l10n.status, - selectedItem: state.contentStatus, - staticItems: ContentStatus.values.toList(), - itemBuilder: (context, status) => - Text(status.l10n(context)), - itemToString: (status) => status.l10n(context), - onChanged: (value) { - if (value == null) return; - context.read().add( - UpdateLocalNativeAdStatusChanged(value), - ); - }, - ), ], ), ), From 030acc5dbab5494d65b62dc7203571bb91584759 Mon Sep 17 00:00:00 2001 From: fulleni Date: 2025年9月24日 19:43:21 +0100 Subject: [PATCH 32/32] refactor(local_ads_management): remove status selection input - Remove SearchableSelectionInput widget for ContentStatus - Remove related imports for ContentStatusL10n and SearchableSelectionInput - Simplify the form by removing status selection functionality --- .../view/edit_local_video_ad_page.dart | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/local_ads_management/view/edit_local_video_ad_page.dart b/lib/local_ads_management/view/edit_local_video_ad_page.dart index a79ae8ab..c8c5d1ad 100644 --- a/lib/local_ads_management/view/edit_local_video_ad_page.dart +++ b/lib/local_ads_management/view/edit_local_video_ad_page.dart @@ -4,8 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; import 'package:flutter_news_app_web_dashboard_full_source_code/local_ads_management/bloc/update_local_ads/update_local_video_ad_bloc.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/content_status_l10n.dart'; -import 'package:flutter_news_app_web_dashboard_full_source_code/shared/widgets/searchable_selection_input.dart'; import 'package:go_router/go_router.dart'; import 'package:ui_kit/ui_kit.dart'; @@ -174,20 +172,6 @@ class _EditLocalVideoAdViewState extends State<_editlocalvideoadview> { .add(UpdateLocalVideoAdTargetUrlChanged(value)), ), const SizedBox(height: AppSpacing.lg), - SearchableSelectionInput( - label: l10n.status, - selectedItem: state.contentStatus, - staticItems: ContentStatus.values.toList(), - itemBuilder: (context, status) => - Text(status.l10n(context)), - itemToString: (status) => status.l10n(context), - onChanged: (value) { - if (value == null) return; - context.read().add( - UpdateLocalVideoAdStatusChanged(value), - ); - }, - ), ], ), ),

AltStyle によって変換されたページ (->オリジナル) /