mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
notification: Stop using 'update()' from MessageTray.Notification
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
parent
b746ab05b3
commit
cc60ce7f94
4 changed files with 14 additions and 10 deletions
|
|
@ -28,7 +28,7 @@ const DND_WINDOW_SWITCH_TIMEOUT = 750;
|
|||
const OVERVIEW_ACTIVATION_TIMEOUT = 0.5;
|
||||
|
||||
class ShellInfo {
|
||||
setMessage(text, options) {
|
||||
setMessage(title, options) {
|
||||
options = Params.parse(options, {
|
||||
undoCallback: null,
|
||||
forFeedback: false,
|
||||
|
|
@ -41,14 +41,14 @@ class ShellInfo {
|
|||
if (!this._notification) {
|
||||
this._notification = new MessageTray.Notification({
|
||||
source,
|
||||
title: text,
|
||||
isTransient: true,
|
||||
forFeedback,
|
||||
});
|
||||
this._notification.connect('destroy', () => delete this._notification);
|
||||
} else {
|
||||
this._notification.update(text, null, {clear: true});
|
||||
}
|
||||
this._notification.set({title});
|
||||
|
||||
this._notification.clearActions();
|
||||
|
||||
if (undoCallback)
|
||||
this._notification.addAction(_('Undo'), () => undoCallback());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue