fix(mobile): Pump ios version and fix static code test (#1451)

* fix(mobile): Pump ios version and fix static code test

* Added changelog note
This commit is contained in:
Alex
2023-01-27 16:20:45 -06:00
committed by GitHub
parent 10a0e58572
commit 0220f900c1
9 changed files with 40 additions and 25 deletions

View File

@@ -7,7 +7,6 @@ import 'package:immich_mobile/modules/album/providers/asset_selection.provider.d
import 'package:immich_mobile/modules/album/providers/shared_album.provider.dart';
import 'package:immich_mobile/modules/album/services/album.service.dart';
import 'package:immich_mobile/modules/album/ui/add_to_album_sliverlist.dart';
import 'package:immich_mobile/modules/album/ui/album_thumbnail_listtile.dart';
import 'package:immich_mobile/routing/router.dart';
import 'package:immich_mobile/shared/models/asset.dart';
import 'package:immich_mobile/shared/ui/drag_sheet.dart';
@@ -15,7 +14,6 @@ import 'package:immich_mobile/shared/ui/immich_toast.dart';
import 'package:openapi/api.dart';
class AddToAlbumBottomSheet extends HookConsumerWidget {
/// The asset to add to an album
final List<Asset> assets;
@@ -38,7 +36,7 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
return null;
},
[],
[],
);
void addToAlbum(AlbumResponseDto album) async {
@@ -46,7 +44,7 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
assets,
album.id,
);
if (result != null) {
if (result.alreadyInAlbum.isNotEmpty) {
ImmichToast.show(
@@ -59,7 +57,7 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
msg: 'Added to ${album.albumName}',
);
}
}
}
ref.read(albumProvider.notifier).getAllAlbums();
ref.read(sharedAlbumProvider.notifier).getAllSharedAlbums();
@@ -67,7 +65,6 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
Navigator.pop(context);
}
return Card(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
@@ -91,15 +88,20 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Add to album',
Text(
'Add to album',
style: Theme.of(context).textTheme.headline2,
),
TextButton.icon(
icon: const Icon(Icons.add),
label: const Text('Create new album'),
onPressed: () {
ref.watch(assetSelectionProvider.notifier).removeAll();
ref.watch(assetSelectionProvider.notifier).addNewAssets(assets);
ref
.watch(assetSelectionProvider.notifier)
.removeAll();
ref
.watch(assetSelectionProvider.notifier)
.addNewAssets(assets);
AutoRouter.of(context).push(
CreateAlbumRoute(
isSharedAlbum: false,

View File

@@ -56,9 +56,10 @@ class AlbumThumbnailListTile extends StatelessWidget {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: onTap ?? () {
AutoRouter.of(context).push(AlbumViewerRoute(albumId: album.id));
},
onTap: onTap ??
() {
AutoRouter.of(context).push(AlbumViewerRoute(albumId: album.id));
},
child: Padding(
padding: const EdgeInsets.only(bottom: 12.0),
child: Row(

View File

@@ -6,7 +6,6 @@ import 'package:hive/hive.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/constants/hive_box.dart';
import 'package:immich_mobile/modules/album/ui/add_to_album_bottom_sheet.dart';
import 'package:immich_mobile/modules/album/ui/add_to_album_list.dart';
import 'package:immich_mobile/modules/asset_viewer/providers/image_viewer_page_state.provider.dart';
import 'package:immich_mobile/modules/asset_viewer/ui/exif_bottom_sheet.dart';
import 'package:immich_mobile/modules/asset_viewer/ui/top_control_app_bar.dart';