~rick-rickspencer3/+junk/flash2

« back to all changes in this revision

Viewing changes to components/setDataWorker.js

  • Committer: Rick Spencer
  • Date: 2015-07-26 16:48:25 UTC
  • Revision ID: rick.spencer@canonical.com-20150726164825-nd7x0co2lcw02xpb
small change to make the hideafter variable >= so the code is easier to understand

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        set["cards"][c]["streak"] = consecutiveCorrect
36
36
        set["cards"][c]["rate"] = cardCorrect / set["cards"][c]["trials"].length
37
37
        set["cards"][c]["days"] = today - ( set["cards"][c]["trials"][set["cards"][c]["trials"].length - 1]["timestamp"] / (1000 * 60 * 60 * 24))
38
 
        if((today - (mostRecentIncorrect / (1000 * 60 * 60 * 24)) < showAfterDays) & consecutiveCorrect > hideAfterConsecutiveCorrect)
 
38
        if((today - (mostRecentIncorrect / (1000 * 60 * 60 * 24)) < showAfterDays) & consecutiveCorrect >= hideAfterConsecutiveCorrect)
39
39
        {
40
40
            set["cards"][c]["visible"] = false
41
41
        }