notification: Stop using old setter methods of MessageTray.Notification

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
Julian Sparber
2024-02-14 11:35:03 +01:00
committed by Florian Müllner
parent 9ac4c7da53
commit 1d1d9806f3
8 changed files with 40 additions and 28 deletions

View File

@ -278,10 +278,10 @@ async function _initializeUI() {
source,
title: _('System was put in unsafe mode'),
body: _('Apps now have unrestricted access'),
isTransient: true,
});
notification.addAction(_('Undo'),
() => (global.context.unsafe_mode = false));
notification.setTransient(true);
source.addNotification(notification);
});
@ -620,8 +620,8 @@ export function notify(msg, details) {
source,
title: msg,
body: details,
isTransient: true,
});
notification.setTransient(true);
source.addNotification(notification);
}