Skip to content

Grouping fails after restoring notifications #649

Description

@wntiv-main

If the config has changed, new grouping rules will not be applied to notifications restored from prior to the change. Additionally, restored grouped notifications will not "update" other members of their group.

Reproduce:

  • run mako with the default (an empty) config
  • spawn a couple of notifications (e.g. with notify-send test)
    Image
  • close the notifications to the history (e.g. right-click)
  • change the grouping config (e.g. add group-by=app-name)
  • reload the config (makoctl reload)
  • restore the notifications
    Image
  • note: adding another notification will update them
    Image
  • extra: deleting a notification from a group and then restoring it will not correctly put it back in it's group
    Image

Analysis:
handle_restore_action never calls group_notifications in any way. A similar snippet as:

mako/dbus/mako.c

Lines 323 to 329 in c4df229

struct mako_criteria *notif_criteria = create_criteria_from_notification(
notif, &notif->style.group_criteria_spec);
if (!notif_criteria) {
continue;
}
group_notifications(state, notif_criteria);
free(notif_criteria);

from reapply_config would fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions