Session target resets when it shouldn't

Scrivener for Mac, build 20780, Mountain Lion.

I left the Scrivener beta open all night. The next morning, after waking my mac, it reset the target to zero, which is consistent with the option “Reset session count at midnight” that I have chosen. But then I quit today after writing a few hundred words, an then I checked my session target after opening the project again; it was back to zero.

I think this may be because I didn’t shut down Scrivener before starting today’s writing, but I’d have to wait another day to test that out.

I verified this today: If you leave a project open past midnight, with the settings for it to reset after midnight, it will do so when the computer wakes up. If you then proceed to write even a single word, the session target increases as it should, but if you then close the project the session target is reset again. The expected behavior is that the session target would remember those new words written when closing and reopening Scrivener on the same day.

Hi Robert,

Thanks for the report. I think I’ve fixed this for the next update, so I’d be grateful if you could keep an eye out for the next beta and test it out. The problem is that when you launch the project, it stashes the “last session date”. When you launch it next time, it compares this against the current date, and if it’s gone past midnight, it resets the session count. However, what it’s not doing is updating the “last session date” when the session gets reset because the project is open at midnight, meaning that when you close and reopen the project, it still has yesterday’s session date in the settings and so resets the count. I’m now updating the session date whenever the midnight timer fires to reset the count, and this should fix things.

All the best,
Keith

I finally got a chance to leave my project open overnight. The session target reset to zero (as it should) from last night’s total. I then added a few words and quit scrivener. When I opened the project again, the session target still showed the number of words I had added today.

Thanks so much for the fix!

Thanks for reporting it! Glad it helped.