Skip to content
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/update grouped images #106

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/store/modules/images.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ const actions = {
else {
recent_images[old_image_index] = new_image
}
// Reassigning value of current_image to new_image
// If a user takes smart stack photos and they select the image as it's updating,
// then the selected image (i.e. the thumbnail with the surrounding yellow border) keeps the yellow border
let current_image = state.current_image
const current_image_SMARTSTK = current_image.header && current_image.header.SMARTSTK
const new_image_SMARTSTK = new_image.header && new_image.header.SMARTSTK
if (current_image_SMARTSTK && current_image_SMARTSTK !== 'no' && current_image_SMARTSTK === new_image_SMARTSTK) {
current_image = new_image
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modifying state in vuex needs to happen by calling a mutation, so direct modifications like line 207 won't work like we want. However, replacing it with commit('setCurrentImage', new_image) should do the trick!

(I was trying out these changes with the send_test_image script I mentioned that uploads simulated smart stacks to the tst site. As far as I can tell, everything should work after making this change).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update--decided to push this fix directly since it's such a minor change and might make observing easier for Wayne over this weekend. Verified it works with the send_test_image script as well as live observations at aro1, so likely no further action needed.

}

// We don't have a toggle implemented yet.
// But eventually we want one to focus on the new image immediately.
Expand Down
Loading