From: Dessalines Date: Sat, 21 Mar 2020 15:21:15 +0000 (-0400) Subject: Hide toast on click. X-Git-Url: http://these/git/%22%7B%7D/static/gitweb.js?a=commitdiff_plain;h=0414edeade7761f1f5db79f6d6bb35c1f457d3ae;p=lemmy.git Hide toast on click. --- diff --git a/ui/src/utils.ts b/ui/src/utils.ts index cab1fd5b..48bd175e 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -444,7 +444,8 @@ export function messageToastify( router: any ) { let backgroundColor = `var(--light)`; - Toastify({ + + let toast = Toastify({ text: `${body}
${creator}`, avatar: avatar, backgroundColor: backgroundColor, @@ -453,7 +454,10 @@ export function messageToastify( position: 'right', duration: 0, onClick: () => { - router.history.push(link); + if (toast) { + toast.hideToast(); + router.history.push(link); + } }, }).showToast(); }