mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Don't show autocompile for users signed up after release date
This commit is contained in:
parent
f2c0bf5515
commit
3e2388a7de
1 changed files with 8 additions and 1 deletions
|
@ -250,9 +250,16 @@ module.exports = ProjectController =
|
|||
return cb(null, true)
|
||||
showAutoCompileOnboarding: (cb) ->
|
||||
cb = underscore.once(cb)
|
||||
if (!user_id?)
|
||||
if !user_id?
|
||||
return cb()
|
||||
timestamp = user_id.toString().substring(0,8)
|
||||
userSignupDate = new Date( parseInt( timestamp, 16 ) * 1000 )
|
||||
if userSignupDate > new Date("2017-10-05")
|
||||
# Don't show for users who registered after it was released
|
||||
return cb(null, false)
|
||||
timeout = setTimeout cb, 500
|
||||
AnalyticsManager.getLastOccurance user_id, "shown-autocompile-onboarding", (error, event) ->
|
||||
clearTimeout timeout
|
||||
if error?
|
||||
return cb(null, false)
|
||||
else if event?
|
||||
|
|
Loading…
Reference in a new issue