From 3f7849e74da4f475d4efa3a085873f49ddf1980c Mon Sep 17 00:00:00 2001 From: Alif Arfab Pavel Date: Sun, 13 Oct 2024 19:17:25 +0600 Subject: [PATCH] fix: updated ui based on the state of the job --- ui/lib/feature/gseet_input/presentation/home_widget.dart | 3 --- ui/lib/feature/shared/presentation/bloc/job_queue_bloc.dart | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/lib/feature/gseet_input/presentation/home_widget.dart b/ui/lib/feature/gseet_input/presentation/home_widget.dart index bcb9cf3..46d4edd 100644 --- a/ui/lib/feature/gseet_input/presentation/home_widget.dart +++ b/ui/lib/feature/gseet_input/presentation/home_widget.dart @@ -27,9 +27,6 @@ class HomeWidget extends StatelessWidget { Expanded( child: BlocBuilder( bloc: jobListBloc, - buildWhen: (prev, cur) { - return prev != cur; - }, builder: (context, state) { return state.when( initial: () => const SizedBox.shrink(), diff --git a/ui/lib/feature/shared/presentation/bloc/job_queue_bloc.dart b/ui/lib/feature/shared/presentation/bloc/job_queue_bloc.dart index 0a91e33..ace1577 100644 --- a/ui/lib/feature/shared/presentation/bloc/job_queue_bloc.dart +++ b/ui/lib/feature/shared/presentation/bloc/job_queue_bloc.dart @@ -25,6 +25,10 @@ class JobQueueState with _$JobQueueState { const factory JobQueueState.update({ required List jobQueueItemList, }) = _update; + + @override + bool operator ==(Object other) => + other is JobQueueState && identical(other, this); } @Injectable()