-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Feature/wpmedia multiselect #5721
Conversation
} else { | ||
mGridAdapter.setAllowMultiselect(true); | ||
mGridAdapter.setInMultiSelect(true); | ||
mGridAdapter.setSelectedItems(selectedItems); | ||
if (selectedItems != null && selectedItems.size() > 0) { |
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.
Small nit: we shouldn't need the null
check here, as we set up selectedItems
as an empty list above and haven't done anything that could null
it (this generates a lint warning).
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.
Good catch - fixed in 903215e
I found an issue with the WP media library screen that predates this PR - it can be addressed in a separate PR, but we should address it before turning this on for all editors:
|
Looks great aside from my nit and pre-existing issue comments 👍 (tested by enabling the picker for all editors and using the visual editor). It would be nice to make it more obvious how to add a gallery, but as we've discussed we can worry about that when we re-work gallery handling in general. |
Wow, surprised I didn't see this before, especially since it's been around for a while. I would like to make that a separate PR. |
Had an issue ready to go for the rotation bug, opened it: #5731 |
…ss-Android into feature/wpmedia-multiselect
…ss-Android into feature/wpmedia-multiselect
|
This PR addresses this comment on #5644.
Adds multi-select to the picker used when selecting a photo from the WP media library. As with other pickers, a single tap selects a single photo and long press enables multi-select so multiple photos can be selected. When multiple items are selected, they're inserted as a
[gallery]
.cc: @aforcier