Skip to content

Commit

Permalink
[FIX]Displaying multiple messages with the same content for a given a…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
christer77 committed Jun 30, 2024
1 parent 1284c47 commit d12248b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/core/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,12 @@ var Hm_Ajax_Request = function() { return {
Hm_Ajax.err_condition = false;
Hm_Notices.hide(true);
}
if (res.router_user_msgs && !$.isEmptyObject(res.router_user_msgs)) {
Hm_Notices.show(res.router_user_msgs);
if (res.router_user_msgs && !$.isEmptyObject(res.router_user_msgs)) {
var hm_msg = Hm_Utils.json_encode(res.router_user_msgs);
if (! Hm_Notices.displayed_messages.includes(hm_msg)) {
Hm_Notices.displayed_messages.push(hm_msg)
Hm_Notices.show(res.router_user_msgs);
}
}
if (res.folder_status) {
for (var name in res.folder_status) {
Expand Down Expand Up @@ -399,6 +403,7 @@ function Hm_Modal(options) {
/* user notification manager */
var Hm_Notices = {
hide_id: false,
displayed_messages: [],

show: function(msgs) {
var message = '';
Expand Down

0 comments on commit d12248b

Please sign in to comment.