From c690a71b3e5ff5e6a1ef04f70ffc3537dc06ef40 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 14 Oct 2022 12:26:59 +0200 Subject: [PATCH] :bug: Fix notification for newsletter shown in all cases --- CHANGES.md | 1 + frontend/src/app/main/ui/onboarding/newsletter.cljs | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index bccfd6bdb..1a8aec34c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -56,6 +56,7 @@ - Fix artboard border radius [Taiga #4291](https://tree.taiga.io/project/penpot/issue/4291) - Fix copied & pasted layer is not visible [Taiga #4283](https://tree.taiga.io/project/penpot/issue/4283) +- Fix notification to newsletter is shown in all cases [Taiga #4367](https://tree.taiga.io/project/penpot/issue/4367) ## 1.15.4-beta diff --git a/frontend/src/app/main/ui/onboarding/newsletter.cljs b/frontend/src/app/main/ui/onboarding/newsletter.cljs index 358ab0783..27dd432ae 100644 --- a/frontend/src/app/main/ui/onboarding/newsletter.cljs +++ b/frontend/src/app/main/ui/onboarding/newsletter.cljs @@ -30,9 +30,10 @@ (mf/use-callback (mf/deps @newsletter-updates @newsletter-news) (fn [] - (st/emit! (dm/success message) - (modal/show {:type :onboarding-team}) - (du/update-profile-props {:newsletter-updates @newsletter-updates :newsletter-news @newsletter-news}))))] + (st/emit! (when (or @newsletter-updates @newsletter-news) + (dm/success message)) + (modal/show {:type :onboarding-team}) + (du/update-profile-props {:newsletter-updates @newsletter-updates :newsletter-news @newsletter-news}))))] [:div.modal-overlay [:div.modal-container.onboarding.newsletter.animated.fadeInDown