mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Fix trying to edit album even when there's no changes
This commit is contained in:
parent
eb80a509ec
commit
6784a8a545
1 changed files with 10 additions and 6 deletions
|
@ -236,12 +236,16 @@ class _Bloc extends Bloc<_Event, _State> with BlocLogger {
|
||||||
_log.info(ev);
|
_log.info(ev);
|
||||||
emit(state.copyWith(isEditBusy: true));
|
emit(state.copyWith(isEditBusy: true));
|
||||||
try {
|
try {
|
||||||
|
if (state.editName != null ||
|
||||||
|
state.editItems != null ||
|
||||||
|
state.editSort != null) {
|
||||||
await collectionsController.edit(
|
await collectionsController.edit(
|
||||||
state.collection,
|
state.collection,
|
||||||
name: state.editName,
|
name: state.editName,
|
||||||
items: state.editItems,
|
items: state.editItems,
|
||||||
itemSort: state.editSort,
|
itemSort: state.editSort,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
emit(state.copyWith(
|
emit(state.copyWith(
|
||||||
isEditMode: false,
|
isEditMode: false,
|
||||||
isEditBusy: false,
|
isEditBusy: false,
|
||||||
|
|
Loading…
Reference in a new issue