summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2024-03-21 14:03:12 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2024-04-15 05:40:04 +0200
commitaf773d5ce16c26fe0330244d5904dded2a8ecb5d (patch)
treef76b31ae8db84ec68df7228a8b8e51e46e6aee8f
parent45e601f8f2f69e28e4c946618a127fb3c21acfa0 (diff)
downloadnextcloud-server-af773d5ce16c26fe0330244d5904dded2a8ecb5d.tar.gz
nextcloud-server-af773d5ce16c26fe0330244d5904dded2a8ecb5d.zip
fix: Fix opening "Remote shares" dialog even if Notifications is available
The dialog is supposed to be shown only if the Notifications app is not available, and to know whether it is available or not it is checked if the header contains the Notifications button. However, in Nextcloud 25 the DOM of the Notifications app changed, so the button is no longer found and thus the dialog was always shown when there are pending shares. Even if the correct element query was used the dialog may be still shown anyway if "external.js" is loaded before the notifications button is added to the header. Therefore now it is checked if the Notifications app is available or not from the OC API. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--apps/federatedfilesharing/js/external.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/federatedfilesharing/js/external.js b/apps/federatedfilesharing/js/external.js
index ecec4d038b2..a245e71dce3 100644
--- a/apps/federatedfilesharing/js/external.js
+++ b/apps/federatedfilesharing/js/external.js
@@ -78,7 +78,7 @@
this.filesApp = filesApp;
this.processIncomingShareFromUrl();
- if (!$('#header').find('div.notifications').length) {
+ if (!('notifications' in OC.appswebroots)) {
// No notification app, display the modal
this.processSharesToConfirm();
}