Ver código fonte

Update app cache when toggling sidebar

Thibaut Courouble 9 anos atrás
pai
commit
ebd6a2204d
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      assets/javascripts/views/layout/document.coffee

+ 3 - 1
assets/javascripts/views/layout/document.coffee

@@ -54,7 +54,9 @@ class app.views.Document extends app.View
   toggleSidebar: (options = {}, shouldShow) ->
     shouldShow ?= if options.save then !@hasSidebar() else app.el.classList.contains(HIDE_SIDEBAR_CLASS)
     app.el.classList[if shouldShow then 'remove' else 'add'](HIDE_SIDEBAR_CLASS)
-    app.settings.setLayout(HIDE_SIDEBAR_CLASS, !shouldShow) if options.save
+    if options.save
+      app.settings.setLayout(HIDE_SIDEBAR_CLASS, !shouldShow)
+      app.appCache?.updateInBackground()
     return
 
   hasSidebar: ->