feat(mobile): map view (#3661)

* feat(mobile): map page - add map view

* map: add map-markers

* feat(map): add relative date filter

* fix: do not let users scroll past map bounds

* fix: fetch relative date from store to state on init

* feat(mobile):re-fetch markers only on filter change

* feat(mobile) - asset bottom sheet in map page

* feat(mobile): display markers based on bottom sheet scroll

* fix: exif-bottom-sheet - rebase conflict

* feat(mobile): map-view - strongly typed map page events

* feat(map): zoom to asset

* chore: dart analyzer fixes

* map-page move attribution to top-right

* feat(mobile): map view - asset selection handling

* feat(mobile): map-view display map in places row

* fix: make asset marker icon responsive

* optimise map page rebuilds

* refactor(mobile): map page

* feat(mobile): map-view: Go to location

* map-view(mobile): minor refactor

* fix(mobile): Handle invalid coords gracefully

* small styling

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
shalong-tanwen 2023-08-27 05:07:35 +00:00 committed by GitHub
parent 305889f32b
commit cb391342d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 2268 additions and 139 deletions

View file

@ -7,17 +7,20 @@ String getThumbnailUrl(
final Asset asset, {
ThumbnailFormat type = ThumbnailFormat.WEBP,
}) {
return _getThumbnailUrl(asset.remoteId!, type: type);
return getThumbnailUrlForRemoteId(asset.remoteId!, type: type);
}
String getThumbnailCacheKey(
final Asset asset, {
ThumbnailFormat type = ThumbnailFormat.WEBP,
}) {
return _getThumbnailCacheKey(asset.remoteId!, type);
return getThumbnailCacheKeyForRemoteId(asset.remoteId!, type: type);
}
String _getThumbnailCacheKey(final String id, final ThumbnailFormat type) {
String getThumbnailCacheKeyForRemoteId(
final String id, {
ThumbnailFormat type = ThumbnailFormat.WEBP,
}) {
if (type == ThumbnailFormat.WEBP) {
return 'thumbnail-image-$id';
} else {
@ -32,7 +35,8 @@ String getAlbumThumbnailUrl(
if (album.thumbnail.value?.remoteId == null) {
return '';
}
return _getThumbnailUrl(album.thumbnail.value!.remoteId!, type: type);
return getThumbnailUrlForRemoteId(album.thumbnail.value!.remoteId!,
type: type,);
}
String getAlbumThumbNailCacheKey(
@ -42,7 +46,10 @@ String getAlbumThumbNailCacheKey(
if (album.thumbnail.value?.remoteId == null) {
return '';
}
return _getThumbnailCacheKey(album.thumbnail.value!.remoteId!, type);
return getThumbnailCacheKeyForRemoteId(
album.thumbnail.value!.remoteId!,
type: type,
);
}
String getImageUrl(final Asset asset) {
@ -53,7 +60,7 @@ String getImageCacheKey(final Asset asset) {
return '${asset.id}_fullStage';
}
String _getThumbnailUrl(
String getThumbnailUrlForRemoteId(
final String id, {
ThumbnailFormat type = ThumbnailFormat.WEBP,
}) {