Skip to content

Commit

Permalink
fixup(notifd): make dismissed signal internal
Browse files Browse the repository at this point in the history
its used only internally, the resolved signal is meant to be the public
api
  • Loading branch information
Aylur committed Oct 29, 2024
1 parent 8705ab4 commit 479e85a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
12 changes: 2 additions & 10 deletions lib/notifd/notification.vala
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@ public class AstalNotifd.Notification : Object {
*/
public signal void resolved(ClosedReason reason);

/**
* Emitted when the user dismisses this notification.
*
* @see dismiss
*/
public signal void dismissed();

/**
* Emitted when an [struct@AstalNotifd.Action] of this notification is invoked.
Expand All @@ -173,12 +167,10 @@ public class AstalNotifd.Notification : Object {
public signal void invoked(string action_id);

/**
* Dismiss this notification popup
*
* This method doesn't have any functionality on its own, but should be handled
* by frontend implementation to hide notification popups.
* Resolve this notification with [enum@AstalNotifd.ClosedReason.DISMISSED_BY_USER].
*/
public void dismiss() { dismissed(); }
internal signal void dismissed();

/**
* Invoke an [struct@AstalNotifd.Action] of this notification.
Expand Down
4 changes: 0 additions & 4 deletions lib/notifd/proxy.vala
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ internal class AstalNotifd.DaemonProxy : Object {
set { proxy.dont_disturb = value; }
}

public uint[] notification_ids() throws DBusError, IOError {
return proxy.notification_ids();
}

public Notification get_notification(uint id) {
return notifs.get(id);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/notifd/signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ignore this, I'm just dumb and can't follow where signals go or get emitted from
## Notification

* resolved(reason) - by daemon/proxy
* dismissed() - by user with `.dismiss()`
* dismissed() - by user with `.dismiss()`, used to emit resolved from proxy/daemon
* invoked(action) - by user with `.invoke()`

## Deamon
Expand Down

0 comments on commit 479e85a

Please sign in to comment.