From 029b282457b577599433234cfc66129db0c523ee Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 17 Feb 2020 20:17:46 +0100 Subject: [PATCH] Fix "Source.notify() has been moved to ..."" error Fix "Source.notify() has been moved to Source.showNotification() this code will break in the future" error. Note this is done with a check for showNotification being a function to preserve compatibility with GNOME-3.34. Signed-off-by: Hans de Goede --- src/extension.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/extension.js b/src/extension.js index 1e218c5..748a47e 100644 --- a/src/extension.js +++ b/src/extension.js @@ -224,7 +224,11 @@ class TeaTime extends PanelMenu.Button { let notification = new MessageTray.Notification(source, subject, text); notification.setTransient(true); - source.notify(notification); + if (typeof source.showNotification === 'function') { + source.showNotification(notification); + } else { + source.notify(notification); + } } _initCountdown(time) {