ticket refinements
This commit is contained in:
@@ -47,7 +47,7 @@ class DashboardNoteListCubit extends Cubit<DashboardNoteListState> {
|
||||
Future<void> _loadNotesSilently() async {
|
||||
try {
|
||||
final notes = await _repository.getNotes();
|
||||
|
||||
if (isClosed) return;
|
||||
emit(
|
||||
state.copyWith(
|
||||
status: DashboardNoteListStatus.success,
|
||||
@@ -56,6 +56,7 @@ class DashboardNoteListCubit extends Cubit<DashboardNoteListState> {
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
if (isClosed) return;
|
||||
emit(
|
||||
state.copyWith(
|
||||
status: DashboardNoteListStatus.failure,
|
||||
|
||||
@@ -57,6 +57,7 @@ class DashboardStoreOperationListCubit
|
||||
limit: 10,
|
||||
offset: 0,
|
||||
);
|
||||
if (isClosed) return;
|
||||
emit(
|
||||
state.copyWith(
|
||||
status: DashboardStoreOperationListStatus.success,
|
||||
@@ -65,6 +66,7 @@ class DashboardStoreOperationListCubit
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
if (isClosed) return;
|
||||
emit(
|
||||
state.copyWith(
|
||||
status: DashboardStoreOperationListStatus.failure,
|
||||
|
||||
@@ -59,7 +59,7 @@ class DashboardStoreTicketListCubit
|
||||
limit: 10,
|
||||
offset: 0,
|
||||
);
|
||||
|
||||
if (isClosed) return;
|
||||
emit(
|
||||
state.copyWith(
|
||||
status: DashboardStoreTicketListStatus.success,
|
||||
@@ -68,6 +68,7 @@ class DashboardStoreTicketListCubit
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
if (isClosed) return;
|
||||
emit(
|
||||
state.copyWith(
|
||||
status: DashboardStoreTicketListStatus.failure,
|
||||
@@ -76,4 +77,10 @@ class DashboardStoreTicketListCubit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> close() {
|
||||
stopListening();
|
||||
return super.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class DashboardTaskListCubit extends Cubit<DashboardTaskListState> {
|
||||
statuses: [TaskStatus.open, TaskStatus.inProgress],
|
||||
limit: 10,
|
||||
);
|
||||
|
||||
if (isClosed) return;
|
||||
emit(
|
||||
state.copyWith(
|
||||
status: DashboardTaskListStatus.success,
|
||||
@@ -62,6 +62,7 @@ class DashboardTaskListCubit extends Cubit<DashboardTaskListState> {
|
||||
),
|
||||
);
|
||||
} catch (e) {
|
||||
if (isClosed) return;
|
||||
emit(
|
||||
state.copyWith(
|
||||
status: DashboardTaskListStatus.failure,
|
||||
|
||||
Reference in New Issue
Block a user