Simplify toggleLayout

pull/1011/head
Jasper van Merle 6 years ago committed by GitHub
parent 35f6f719e3
commit 0c42db5749
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -124,5 +124,6 @@ class app.Settings
classList[if enable then 'add' else 'remove']('_theme-dark') classList[if enable then 'add' else 'remove']('_theme-dark')
toggleLayout: (layout, enable) -> toggleLayout: (layout, enable) ->
document.body.classList[if enable then 'add' else 'remove'](layout) unless layout is SIDEBAR_HIDDEN_LAYOUT classList = document.body.classList
document.body.classList[if $.overlayScrollbarsEnabled() then 'add' else 'remove']('_overlay-scrollbars') classList[if enable then 'add' else 'remove'](layout) unless layout is SIDEBAR_HIDDEN_LAYOUT
classList[if $.overlayScrollbarsEnabled() then 'add' else 'remove']('_overlay-scrollbars')

Loading…
Cancel
Save