Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
While helping my wife import her Instagram into micro.blog she ran into an unexpected behavior with the Instagram import feature. Most of her posts include several pictures and in the import dialog only the first image from each post is shown, so when she selected a few "pictures", clicked imported and ended up with over a dozen new blog posts she was surprised. I dug into the code and saw the import loops through all the media in each post and creates a separate blog post for each photo. I'm sure a majority of folks post only a single photo and this works great, and for those other folks the good news is all their photos are imported.
Changes
I made some very minor changes to the Instagram import so it will now just take the first photo from each Instagram post and create a new blog post in micro.blog with just that one image.
Next I made it so if the Instagram post had multiple photos then it will use the caption from the post rather than the photo, because in a multi-photo post there is a special caption in the parent object and the child photos are empty.
Finally, I updated the label for selected item count to say "post" instead of "photo" to better convey what is being imported.
Most Importantly
I don't expect these changes to actually be merged into the product since this new process does have some trade offs for those users that want to import ALL of their photos. I just figured this was the best way to communicate it back to you. I think it is so cool to be able to view the source code, understand the inner workings and then make this type of tweak (even if I'm not a native macOS developer). Thanks! Also if this just creates extra noise in your process please let me know and feel free to delete this PR.
!