From 621c142f8ed1f752262ca87a4f6b1469d3ba25aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 6 Dec 2021 16:24:09 -0500 Subject: [PATCH] refactor: alerts --- public/src/client/topic.js | 2 +- public/src/modules/messages.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/client/topic.js b/public/src/client/topic.js index 06b9dc4f36..f481b200ec 100644 --- a/public/src/client/topic.js +++ b/public/src/client/topic.js @@ -243,7 +243,7 @@ define('forum/topic', [ span.html('').addClass('hidden'); } if ($(window).scrollTop() > 300) { - app.removeAlert('bookmark'); + alerts.remove('bookmark'); } } diff --git a/public/src/modules/messages.js b/public/src/modules/messages.js index d68ea93abf..af028e1609 100644 --- a/public/src/modules/messages.js +++ b/public/src/modules/messages.js @@ -28,14 +28,14 @@ define('messages', ['bootbox', 'translator', 'storage', 'alerts'], function (boo if (!app.user.email) { msg.message = '[[error:no-email-to-confirm]]'; msg.clickfn = function () { - app.removeAlert('email_confirm'); + alerts.remove('email_confirm'); ajaxify.go('user/' + app.user.userslug + '/edit/email'); }; alerts.alert(msg); } else if (!app.user['email:confirmed'] && !app.user.isEmailConfirmSent) { msg.message = message || '[[error:email-not-confirmed]]'; msg.clickfn = function () { - app.removeAlert('email_confirm'); + alerts.remove('email_confirm'); socket.emit('user.emailConfirm', {}, function (err) { if (err) { return alerts.error(err);