Repository navigation
Find an image's picture by its picture id #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
26658e6
efc15fd
9f4b327
5b2394d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,11 @@ void appendMigratedPageOps( | |
|
|
||
| for (final image in page.imageData) { | ||
| final elementId = nextUniqueMigrationId(image.id, usedElementIds); | ||
| final payload = cloudImagePayloadFromPlacedImage(image) | ||
| // A renamed image keeps showing its picture, which is stored under its | ||
| // old id. | ||
| final payload = cloudImagePayloadFromPlacedImage( | ||
| elementId == image.id ? image : image.copyWith(assetId: image.pictureId), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Preserve If a stored image has a duplicate element ID and 🤖 Prompt for AI Agents |
||
| ) | ||
| ..putIfAbsent('elementType', () => 'image') | ||
| ..['id'] = elementId; | ||
| ops.add( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: SunkenInTime/icarus
Length of output: 2710
🏁 Script executed:
Repository: SunkenInTime/icarus
Length of output: 41761
🏁 Script executed:
Repository: SunkenInTime/icarus
Length of output: 32141
🏁 Script executed:
Repository: SunkenInTime/icarus
Length of output: 23769
🏁 Script executed:
Repository: SunkenInTime/icarus
Length of output: 26563
🏁 Script executed:
Repository: SunkenInTime/icarus
Length of output: 11361
Normalize empty
assetIdtonullinPlacedImage.PlacedImage.fromJsonand the Hive adapter acceptassetId: '', sopictureIdbecomes empty. Cloud operation matching treats an emptyassetIdas absent and uses the placement ID instead. Image lookup and upload reconciliation usepictureIddirectly. This mismatch can make the existing asset or local bytes unavailable and produceImageFailedor skip the upload.Suggested fix
PlacedImage({ required super.position, required super.id, required this.aspectRatio, required this.scale, required this.fileExtension, this.sizeVersion, this.tagColorValue, this.link = '', - this.assetId, - }); + String? assetId, + }) : assetId = assetId?.isNotEmpty == true ? assetId : null;🤖 Prompt for AI Agents