Skip to content

Commit

Permalink
Merge branch 'main' into set-up-release-workflow
Browse files Browse the repository at this point in the history
# Conflicts:
#	.idea/libraries/Flutter_Plugins.xml
  • Loading branch information
cp-pratik-k committed Apr 26, 2024
2 parents bbca0fd + 9f407e2 commit ed6fa8c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/libraries/Flutter_Plugins.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions app/lib/ui/flow/home/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,17 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
}
return AppMediaItem(
key: ValueKey(media.id),
onTap: () {
onTap: () async {
if (selectedMedias.isNotEmpty) {
notifier.toggleMediaSelection(media);
} else {
AppRouter.preview(
await AppRouter.preview(
medias: medias.values
.expand((element) => element)
.toList(),
startFrom: media.id)
.push(context);
notifier.loadLocalMedia();
}
},
onLongTap: () {
Expand Down
3 changes: 3 additions & 0 deletions app/lib/ui/flow/media_preview/media_preview_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class MediaPreviewStateNotifier extends StateNotifier<MediaPreviewState> {
Future<void> deleteMediaFromLocal(String id) async {
try {
await _localMediaService.deleteMedias([id]);
state = state.copyWith(
medias: state.medias.where((element) => element.id != id).toList(),
);
} catch (error) {
state = state.copyWith(error: error);
}
Expand Down

0 comments on commit ed6fa8c

Please sign in to comment.