Compare commits

..

1 Commits

Author SHA1 Message Date
Santo Shakil 07b44e772c fix(mobile): stop double close animation when dismissing an asset 2026-07-01 14:56:29 +06:00
3 changed files with 6 additions and 115 deletions
@@ -168,6 +168,12 @@ class _AssetViewerState extends ConsumerState<AssetViewer> {
return;
}
// The viewer is closing; don't flip the current asset now. Flipping it swaps
// the grid tile hero keys mid pop and animates the close on two tiles (#23779).
if (!mounted || !(ModalRoute.of(context)?.isActive ?? true)) {
return;
}
AssetViewer._setAsset(ref, asset);
_preloader.preload(index, context.sizeData);
_handleCasting();
-92
View File
@@ -183,98 +183,6 @@
},
"uiHints": ["Filter"]
},
{
"name": "assetDateFilter",
"title": "Filter by date",
"description": "Filter assets by date taken",
"types": ["AssetV1"],
"schema": {
"type": "object",
"properties": {
"startDate": {
"type": "object",
"title": "Start date",
"description": "Earliest date of assets to include",
"properties": {
"day": {
"type": "number",
"title": "Day",
"description": "Day of the year to match",
"uiHint": {
"order": 1
}
},
"month": {
"type": "number",
"title": "Month",
"description": "Month of the year to match",
"uiHint": {
"order": 2
}
},
"year": {
"type": "number",
"title": "Year",
"description": "Year to match",
"uiHint": {
"order": 3
}
}
},
"uiHint": {
"order": 1
},
"required": ["day", "month", "year"]
},
"endDate": {
"type": "object",
"title": "End date",
"description": "Latest date of assets to include",
"properties": {
"day": {
"type": "number",
"title": "Day",
"description": "Day of the year to match",
"uiHint": {
"order": 1
}
},
"month": {
"type": "number",
"title": "Month",
"description": "Month of the year to match",
"uiHint": {
"order": 2
}
},
"year": {
"type": "number",
"title": "Year",
"description": "Year to match",
"uiHint": {
"order": 3
}
}
},
"uiHint": {
"order": 2
},
"required": ["day", "month", "year"]
},
"recurring": {
"type": "boolean",
"default": false,
"title": "Match recurring dates",
"description": "Allow any assets with matching months/days regardless of the year",
"uiHint": {
"order": 3
}
}
},
"required": ["recurring", "startDate", "endDate"]
},
"uiHints": ["Filter"]
},
{
"name": "assetTypeFilter",
"title": "Filter by asset type",
-23
View File
@@ -124,27 +124,6 @@ const methods = wrapper<Manifest>({
return { workflow: { continue: earthDiameter * delta <= (config.coordinate?.radius ?? 0) } };
},
assetDateFilter: ({ config, data }) => {
const assetDate = new Date(data.asset.localDateTime);
let startDate = new Date(config.startDate.year, config.startDate.month - 1, config.startDate.day);
let endDate = new Date(config.endDate.year, config.endDate.month - 1, config.endDate.day);
if (config.recurring) {
startDate.setFullYear(assetDate.getFullYear());
endDate.setFullYear(assetDate.getFullYear());
if (endDate < startDate) {
if (assetDate > endDate) {
endDate.setFullYear(endDate.getFullYear() + 1);
} else {
startDate.setFullYear(startDate.getFullYear() - 1);
}
}
}
return { workflow: { continue: assetDate >= startDate && assetDate <= endDate } };
},
assetLock: ({ config, data }) => {
if (!config.inverse && data.asset.visibility !== AssetVisibility.Locked) {
return { changes: { asset: { visibility: AssetVisibility.Locked } } };
@@ -196,7 +175,6 @@ const {
assetFavorite,
assetFileFilter,
assetLocationFilter,
assetDateFilter,
assetLock,
assetMissingTimeZoneFilter,
assetTypeFilter,
@@ -213,7 +191,6 @@ export {
assetFavorite,
assetFileFilter,
assetLocationFilter,
assetDateFilter,
assetLock,
assetMissingTimeZoneFilter,
assetTypeFilter,