cleanup: Also replace Params.parse(..., true) with spread

This is what Params.parse() boils down to when accepting extra
parameters, so we can just as well use standard syntax here.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3196>
This commit is contained in:
Florian Müllner
2019-12-17 20:06:24 +01:00
parent 8eec7ac3f4
commit fe1eab1b3c
3 changed files with 6 additions and 11 deletions

View File

@ -9,7 +9,6 @@ import Shell from 'gi://Shell';
import * as Config from '../misc/config.js';
import * as Main from './main.js';
import * as MessageTray from './messageTray.js';
import * as Params from '../misc/params.js';
import {loadInterfaceXML} from '../misc/fileUtils.js';
import {NotificationErrors, NotificationError} from '../misc/dbusErrors.js';
@ -128,7 +127,7 @@ class FdoNotificationDaemon {
hints[hint] = hints[hint].deepUnpack();
}
hints = Params.parse(hints, {urgency: Urgency.NORMAL}, true);
hints = {urgency: Urgency.NORMAL, ...hints};
// Be compatible with the various hints for image data and image path
// 'image-data' and 'image-path' are the latest name of these hints, introduced in 1.2