mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
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:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user