Fix trying to edit album even when there's no changes

This commit is contained in:
Ming Ming 2024-06-02 21:06:12 +08:00
parent eb80a509ec
commit 6784a8a545

View file

@ -236,12 +236,16 @@ class _Bloc extends Bloc<_Event, _State> with BlocLogger {
_log.info(ev);
emit(state.copyWith(isEditBusy: true));
try {
if (state.editName != null ||
state.editItems != null ||
state.editSort != null) {
await collectionsController.edit(
state.collection,
name: state.editName,
items: state.editItems,
itemSort: state.editSort,
);
}
emit(state.copyWith(
isEditMode: false,
isEditBusy: false,