From fa2d49c54e9ecf7d2d34c74c625383f394a65514 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 17 Mar 2023 14:23:20 -0500 Subject: [PATCH] added onClickPublisher Signed-off-by: Matt Bruce --- VDS/Components/Notification/Notification.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/VDS/Components/Notification/Notification.swift b/VDS/Components/Notification/Notification.swift index 527ff307..19dca1c7 100644 --- a/VDS/Components/Notification/Notification.swift +++ b/VDS/Components/Notification/Notification.swift @@ -159,11 +159,10 @@ public class Notification: View { $0.size = .small } - firstButton.publisher(for: .touchUpInside).sink { button in + firstButton.onClickSubscriber = firstButton.publisher(for: .touchUpInside).sink { button in print("\(button.text) has been pressed") - }.store(in: &subscribers) - - + } + #warning("Upon adding the button into the stack view, button is visible. Where as ButtonGroup with a single button is not rendered") ///This below doesn't work