feat(notifications): expose all hints #158

This commit is contained in:
Aylur
2023-11-02 23:10:49 +01:00
parent dc3439fe1f
commit 15710c54f5
+4
View File
@@ -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() {