mirror of
https://github.com/oleid/gnome-shell-teatime.git
synced 2022-04-29 18:53:50 +00:00
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 <hdegoede@redhat.com>
This commit is contained in:
parent
aa682804aa
commit
029b282457
@ -224,8 +224,12 @@ class TeaTime extends PanelMenu.Button {
|
|||||||
|
|
||||||
let notification = new MessageTray.Notification(source, subject, text);
|
let notification = new MessageTray.Notification(source, subject, text);
|
||||||
notification.setTransient(true);
|
notification.setTransient(true);
|
||||||
|
if (typeof source.showNotification === 'function') {
|
||||||
|
source.showNotification(notification);
|
||||||
|
} else {
|
||||||
source.notify(notification);
|
source.notify(notification);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_initCountdown(time) {
|
_initCountdown(time) {
|
||||||
this._startTime = new Date();
|
this._startTime = new Date();
|
||||||
|
Loading…
Reference in New Issue
Block a user