@@ -53,6 +53,7 @@ define(function main(require, exports, module) {
5353 // this will later be assigned its correct values once entitlementsManager loads
5454 let hasLiveEditCapability = false ;
5555 let isPaidUser = false ;
56+ let isLoggedIn = false ;
5657
5758 const PREFERENCE_LIVE_PREVIEW_MODE = CONSTANTS . PREFERENCE_LIVE_PREVIEW_MODE ;
5859
@@ -98,6 +99,7 @@ define(function main(require, exports, module) {
9899 showRulerLines : false , // default value, this will get updated when the extension loads
99100 imageGalleryState : _getImageGalleryState ( ) , // image gallery selected state
100101 isPaidUser : false , // will be updated when we fetch entitlements
102+ isLoggedIn : false , // will be updated when we fetch entitlements
101103 hasLiveEditCapability : false // handled inside _liveEditCapabilityChanged function
102104 } ;
103105
@@ -259,6 +261,15 @@ define(function main(require, exports, module) {
259261 }
260262 }
261263
264+ function _isLoggedInChanged ( newStatus ) {
265+ if ( newStatus !== isLoggedIn ) {
266+ isLoggedIn = newStatus ;
267+ const config = MultiBrowserLiveDev . getConfig ( ) ;
268+ config . isLoggedIn = isLoggedIn ;
269+ MultiBrowserLiveDev . updateConfig ( config ) ;
270+ }
271+ }
272+
262273 function setMode ( mode ) {
263274 if ( mode === LIVE_EDIT_MODE && ! hasLiveEditCapability ) {
264275 return false ;
@@ -346,6 +357,7 @@ define(function main(require, exports, module) {
346357 // private api
347358 exports . _liveEditCapabilityChanged = _liveEditCapabilityChanged ;
348359 exports . _isPaidUserChanged = _isPaidUserChanged ;
360+ exports . _isLoggedInChanged = _isLoggedInChanged ;
349361
350362 // public events
351363 exports . EVENT_OPEN_PREVIEW_URL = MultiBrowserLiveDev . EVENT_OPEN_PREVIEW_URL ;
0 commit comments