Skip to content

Commit dc57f9f

Browse files
committed
fix(notifications): hide action bar when all actions have empty IDs
1 parent 0e73df1 commit dc57f9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/notifications/Actions/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const Actions = ({ notification, showActions }: ActionProps): JSX.Element
4646
>
4747
<eventbox>
4848
<box className={'notification-card-actions'} hexpand valign={Gtk.Align.END}>
49-
{notification.get_actions().map((action) => {
49+
{notification.get_actions().filter((a) => a.id !== '').map((action) => {
5050
return <ActionButton notification={notification} action={action} />;
5151
})}
5252
</box>

src/components/notifications/Notification/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const NotificationCard = ({
2929
}: NotificationCardProps): JSX.Element => {
3030
let actionBox: ActionBox | null;
3131

32-
if (notification.get_actions().length) {
32+
if (notification.get_actions().filter((a) => a.id !== '').length) {
3333
actionBox = <Actions notification={notification} showActions={showActions} />;
3434
} else {
3535
actionBox = null;

0 commit comments

Comments
 (0)