소스 검색

Update app cache when toggling sidebar

Thibaut Courouble 9 년 전
부모
커밋
ebd6a2204d
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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: ->