-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
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.
i haven't tested this but the code LGTM
@camallen mind checking the behaviour here? https://preview.zooniverse.org/shakespearesworld |
@simoneduca that link doesn't use local storage for subjects, however it doesn't set the current subject and it persists the annotations across subject reloads thus might incorrectly submit annotations for the wrong subject. If i start annotating a subject should it remember this and ask me before reloading / reload that subject that i've been working on? |
Ah yes, my bad. I had that check/warning system in place already, which is made useless by my latest changes. I'll store the current subject and clear once the work is submitted or cancelled. |
@camallen and I have figured out what was wrong with the subjects queue. I've just published the latest changes to https://preview.zooniverse.org/shakespearesworld/#!/ |
This seems to be working fine for me, but it would be best to ask those who reported the bug on Talk, including mutabilitie, I think? |
I've messaged mutabilitie asking her to check. |
Thanks Cam. |
@@ -161,7 +153,7 @@ function SubjectsFactory($q, AnnotationsFactory, localStorageService, zooAPI, zo | |||
} | |||
|
|||
function _setCurrent() { | |||
_data.current = _queue.shift(); | |||
_data.current = _queue[Math.floor(Math.random() * _queue.length)]; |
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.
Array.shift()
removes the first element from an array, but the new code here doesn't change the _queue
array. Is that intentional? It looks like you will always serve the same small group of subjects to the volunteers with this code.
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.
Ah I just missed that, thanks! I'll push a fix
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.
@eatyourgreens please check last commit
@@ -161,7 +153,8 @@ function SubjectsFactory($q, AnnotationsFactory, localStorageService, zooAPI, zo | |||
} | |||
|
|||
function _setCurrent() { | |||
_data.current = _queue.shift(); | |||
var randonIndex = Math.floor(Math.random() * _queue.length); |
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.
typo in random.
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.
Thanks
Fix #355