import { Gtk } from "ags/gtk4"; import { HistoryNotification, Notifications } from "../../../modules/notifications"; import { NotificationWidget } from "../../../widget/Notification"; import { tr } from "../../../i18n/intl"; import { createBinding, For } from "ags"; import AstalNotifd from "gi://AstalNotifd"; export const NotifHistory = () => `notif-history ${history.length < 1 ? "hide" : ""}`)} vexpand={false}> { if(!(self.get_child()! as Gtk.Viewport).get_child()) return; self.minContentHeight = ((self.get_child()! as Gtk.Viewport).get_child() as Gtk.Box ).get_first_child()!.get_allocation().height || 0; }}> {(notif: AstalNotifd.Notification|HistoryNotification) => Notifications.getDefault().removeHistory(n.id)} actionClicked={(n) => Notifications.getDefault().removeHistory(n.id)} />} Notifications.getDefault().clearHistory()}> as Gtk.Box;