From ff551ee3375f35335f30c8bc8c6c5b7645d12cfe Mon Sep 17 00:00:00 2001 From: Edgars Date: Wed, 30 Nov 2022 10:13:27 +0200 Subject: Fix notifications count for Nextcloud 25 --- recipes/nextcloud/package.json | 3 +-- recipes/nextcloud/webview.js | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'recipes') diff --git a/recipes/nextcloud/package.json b/recipes/nextcloud/package.json index de475f6..239cd6b 100644 --- a/recipes/nextcloud/package.json +++ b/recipes/nextcloud/package.json @@ -1,9 +1,8 @@ { "id": "nextcloud", "name": "Nextcloud", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", - "repository": "https://github.com/eandersons/ferdi-recipe-nextcloud", "config": { "hasNotificationSound": true, "hasIndirectMessages": true, diff --git a/recipes/nextcloud/webview.js b/recipes/nextcloud/webview.js index 786f7a8..cb13e02 100644 --- a/recipes/nextcloud/webview.js +++ b/recipes/nextcloud/webview.js @@ -1,7 +1,9 @@ module.exports = Ferdium => { const getMessages = () => { - const direct = document.querySelectorAll( - '.notifications .notification-container .notification-wrapper li .notification', + const direct = document.querySelector( + '#header-menu-notifications, .notifications' + ).querySelectorAll( + '.notification-container .notification-wrapper .notification' ).length; Ferdium.setBadge(direct); -- cgit v1.2.3-54-g00ecf