Properly start tutorial on first run, even if you have new messages.

We were previously having an issue where the tutorial could
be pre-empted if you got a few messages while you were first
logging in.

I have some reservations about this being slightly fragile, and a
better approach might be to just have a bit that we use to determine
whether or not you've already seen a tutorial. (Or potentially that
checks whether or not you've ever sent a message.)

(imported from commit f8858f64a36bcd25887b76314caff283929f340c)
This commit is contained in:
Waseem Daher
2013-03-11 23:54:17 -04:00
parent dffde7714c
commit 33dc3a2fb7
5 changed files with 11 additions and 12 deletions

View File

@@ -287,14 +287,10 @@ exports.is_running = function () {
return tutorial_running;
};
var should_autostart_tutorial = false;
exports.run_when_ready = function () {
should_autostart_tutorial = true;
};
exports.initialize = function () {
make_script();
if (should_autostart_tutorial) {
// Global variable populated by the server code
if (needs_tutorial) {
exports.start();
}
};