]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not inject a #app-navigation-toggle if there is already one 14972/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Fri, 5 Apr 2019 13:41:12 +0000 (15:41 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Wed, 10 Apr 2019 12:08:55 +0000 (14:08 +0200)
This allows apps to ship their own, as in some cases the #app-content
element does not exist on page load and therefore the injection fails
and the icon is missing afterwards.

Fixes https://github.com/nextcloud/server/issues/14956

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
core/js/js.js

index e03e2334c098581214b2a0bbf9aadb73dbe4ce5c..5e8532883b41444cb0c87b8a302d5fd7e16f0aa6 100644 (file)
@@ -1192,7 +1192,9 @@ function initCore() {
        setTimeout(resizeMenu, 0);
 
        // just add snapper for logged in users
-       if($('#app-navigation').length && !$('html').hasClass('lte9')) {
+       // and if the app doesn't handle the nav slider itself
+       if($('#app-navigation').length && !$('html').hasClass('lte9')
+           && !$('#app-content').hasClass('no-snapper')) {
 
                // App sidebar on mobile
                var snapper = new Snap({