@@ -57,6 +57,8 @@ module.exports = baseVw.extend({
5757 this . languages = new languagesModel ( ) ;
5858 this . showDiscIntro = options . showDiscIntro ;
5959
60+ this . showSocial = localStorage . getItem ( 'showSocial' ) !== 'hide' ;
61+
6062 this . listenTo ( window . obEventBus , "updateProfile" , function ( ) {
6163 this . refreshProfile ( ) ;
6264 } ) ;
@@ -332,7 +334,10 @@ module.exports = baseVw.extend({
332334 var connectedServer = app . serverConnectModal . getConnectedServer ( ) ;
333335
334336 self . $el . html ( loadedTemplate (
335- __ . extend ( self . model . toJSON ( ) , { connectedServer : connectedServer && connectedServer . toJSON ( ) } )
337+ __ . extend ( self . model . toJSON ( ) , {
338+ connectedServer : connectedServer && connectedServer . toJSON ( ) ,
339+ showSocial : self . showSocial ,
340+ } )
336341 ) ) ;
337342
338343 self . $notifMenu = self . $ ( '.js-navNotificationsMenu' ) ;
@@ -378,7 +383,6 @@ module.exports = baseVw.extend({
378383 self . suggestionsVw = new SuggestionsVw ( {
379384 $input : self . $addressInput
380385 } ) ;
381- self . $socialReminder = self . $ ( '.js-socialReminder' ) ;
382386
383387 self . $ ( '.js-mainSearchWrapper' ) . append ( self . suggestionsVw . render ( ) . el ) ;
384388
@@ -403,7 +407,8 @@ module.exports = baseVw.extend({
403407 self . registerChild ( self . aboutModal ) ;
404408 }
405409
406- if ( localStorage . getItem ( 'showSocial' ) !== 'hide' ) {
410+ if ( self . showSocial ) {
411+ self . $socialReminder = self . $ ( '.js-socialReminder' ) ;
407412 setTimeout ( function ( ) {
408413 self . $socialReminder . addClass ( 'show' ) ;
409414 } , 10000 ) ;
0 commit comments