mirror of
https://github.com/zoriya/ags.git
synced 2026-06-01 18:25:40 +00:00
feat(notifications): expose all hints #158
This commit is contained in:
@@ -22,6 +22,7 @@ interface Hints {
|
||||
'image-data'?: GLib.Variant
|
||||
'desktop-entry'?: GLib.Variant
|
||||
'urgency'?: GLib.Variant
|
||||
[hint: string]: GLib.Variant | undefined
|
||||
}
|
||||
|
||||
interface NotifcationJson {
|
||||
@@ -63,6 +64,7 @@ class Notification extends Service {
|
||||
'time': ['int'],
|
||||
'image': ['string'],
|
||||
'popup': ['boolean'],
|
||||
'hints': ['jsobject'],
|
||||
});
|
||||
}
|
||||
|
||||
@@ -77,6 +79,7 @@ class Notification extends Service {
|
||||
_time: number;
|
||||
_image: string | null;
|
||||
_popup: boolean;
|
||||
_hints: Hints;
|
||||
|
||||
get id() { return this._id; }
|
||||
get app_name() { return this._appName; }
|
||||
@@ -119,6 +122,7 @@ class Notification extends Service {
|
||||
this._time = GLib.DateTime.new_now_local().to_unix();
|
||||
this._image = this._appIconIsFile() ? appIcon : this._parseImageData(hints['image-data']);
|
||||
this._popup = popup;
|
||||
this._hints = hints;
|
||||
}
|
||||
|
||||
dismiss() {
|
||||
|
||||
Reference in New Issue
Block a user