diff --git a/services/web/app/coffee/controllers/ProjectController.coffee b/services/web/app/coffee/controllers/ProjectController.coffee index 1aefeabd0a..1c4b9a3349 100755 --- a/services/web/app/coffee/controllers/ProjectController.coffee +++ b/services/web/app/coffee/controllers/ProjectController.coffee @@ -120,7 +120,7 @@ module.exports = class ProjectController allowed: true featureSwitches: dropbox: false - longPolling: false + trackChanges: false else anonymous = false SubscriptionLocator.getUsersSubscription user._id, (err, subscription)-> @@ -154,7 +154,7 @@ module.exports = class ProjectController spellCheckLanguage: user.ace.spellCheckLanguage pdfViewer : user.ace.pdfViewer docPositions: {} - longPolling: user.featureSwitches.longPolling + trackChanges: user.featureSwitches.trackChanges }) sharelatexObject : JSON.stringify({ siteUrl: Settings.siteUrl, diff --git a/services/web/app/coffee/models/User.coffee b/services/web/app/coffee/models/User.coffee index a4141880a0..e71182ec2b 100644 --- a/services/web/app/coffee/models/User.coffee +++ b/services/web/app/coffee/models/User.coffee @@ -32,7 +32,7 @@ UserSchema = new Schema } featureSwitches : { dropbox: {type:Boolean, default:true}, - longPolling: {type:Boolean, default:false} + trackChanges: {type:Boolean, default:false} } referal_id : {type:String, default:() -> uuid.v4().split("-")[0]} refered_users: [ type:ObjectId, ref:'User' ] diff --git a/services/web/public/coffee/ide.coffee b/services/web/public/coffee/ide.coffee index 871ac98d1e..e98163f87d 100644 --- a/services/web/public/coffee/ide.coffee +++ b/services/web/public/coffee/ide.coffee @@ -97,8 +97,6 @@ define [ ioOptions = reconnect: false "force new connection": true - if @userSettings.longPolling - ioOptions.transports = ["xhr-polling"] @socket = socket = io.connect null, ioOptions @messageManager = new MessageManager(@) @@ -119,7 +117,8 @@ define [ @cursorManager = new CursorManager(@) @fileViewManager = new FileViewManager(@) @analyticsManager = new AnalyticsManager(@) - @trackChangesManager = new TrackChangesManager(@) + if @userSettings.trackChanges + @trackChangesManager = new TrackChangesManager(@) @setLoadingMessage("Connecting") firstConnect = true