refactor(mobile): share action button in new timeline (#19967)

* share asset button

* include source

* move to repository

* formatting
This commit is contained in:
Mert
2025-07-17 19:41:30 +03:00
committed by GitHub
parent 531515daf9
commit 055b930066
15 changed files with 158 additions and 24 deletions

View File

@@ -12,7 +12,7 @@ import 'package:immich_mobile/repositories/asset_media.repository.dart';
import 'package:immich_mobile/repositories/drift_album_api_repository.dart';
import 'package:immich_mobile/routing/router.dart';
import 'package:immich_mobile/widgets/common/location_picker.dart';
import 'package:maplibre_gl/maplibre_gl.dart';
import 'package:maplibre_gl/maplibre_gl.dart' as maplibre;
import 'package:riverpod_annotation/riverpod_annotation.dart';
final actionServiceProvider = Provider<ActionService>(
@@ -124,12 +124,12 @@ class ActionService {
List<String> remoteIds,
BuildContext context,
) async {
LatLng? initialLatLng;
maplibre.LatLng? initialLatLng;
if (remoteIds.length == 1) {
final exif = await _remoteAssetRepository.getExif(remoteIds[0]);
if (exif?.latitude != null && exif?.longitude != null) {
initialLatLng = LatLng(exif!.latitude!, exif.longitude!);
initialLatLng = maplibre.LatLng(exif!.latitude!, exif.longitude!);
}
}
@@ -165,4 +165,8 @@ class ActionService {
return removedCount;
}
Future<int> shareAssets(List<BaseAsset> assets) {
return _assetMediaRepository.shareAssets(assets);
}
}