Skip to content

Commit

Permalink
chore: revert multiselectgrid loading status
Browse files Browse the repository at this point in the history
  • Loading branch information
alextran1502 committed Dec 16, 2024
1 parent b126a79 commit e5594a5
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions mobile/lib/widgets/asset_grid/multiselect_grid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:fluttertoast/fluttertoast.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/extensions/collection_extensions.dart';
import 'package:immich_mobile/providers/album/album.provider.dart';
import 'package:immich_mobile/providers/asset_viewer/render_list_status_provider.dart';
import 'package:immich_mobile/services/album.service.dart';
import 'package:immich_mobile/services/stack.service.dart';
import 'package:immich_mobile/providers/backup/manual_upload.provider.dart';
Expand All @@ -23,7 +22,6 @@ import 'package:immich_mobile/entities/album.entity.dart';
import 'package:immich_mobile/entities/asset.entity.dart';
import 'package:immich_mobile/providers/asset.provider.dart';
import 'package:immich_mobile/providers/user.provider.dart';
import 'package:immich_mobile/widgets/asset_grid/multiselect_grid_status_indicator.dart';
import 'package:immich_mobile/widgets/common/immich_loading_indicator.dart';
import 'package:immich_mobile/widgets/common/immich_toast.dart';
import 'package:immich_mobile/utils/immich_loading_overlay.dart';
Expand Down Expand Up @@ -75,27 +73,6 @@ class MultiselectGrid extends HookConsumerWidget {
final selection = useState(<Asset>{});
final currentUser = ref.watch(currentUserProvider);
final processing = useProcessingOverlay();
final renderList =
useState<RenderList?>(ref.read(renderListProvider).value);

ref.listen(renderListProvider, (_, data) {
data.when(
data: (data) {
ref.read(renderListStatusProvider.notifier).status = data.isEmpty
? RenderListStatusEnum.empty
: RenderListStatusEnum.complete;
renderList.value = data;
},
loading: () {
ref.read(renderListStatusProvider.notifier).status =
RenderListStatusEnum.loading;
},
error: (error, _) {
ref.read(renderListStatusProvider.notifier).status =
RenderListStatusEnum.error;
},
);
});

useEffect(
() {
Expand Down

0 comments on commit e5594a5

Please sign in to comment.