Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17bf0f93 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN Committed by Akhil
Browse files

notification-issue fix

parent b6ddb07c
Loading
Loading
Loading
Loading
+17 −9
Original line number Diff line number Diff line
@@ -87,12 +87,20 @@ function replaceNavbarIcons() {
  $("#header .header-right .magnify-icon").empty();

  /* Notifications icon(Replace src on load) */

  // Select the entire DOM for observing:
  const target = document.getElementById("header");
  // Create a new observer instance:
  const observer = new MutationObserver(function () {
    const notifImgSelector = "#header .notifications .notifications-button img";
    if ($(notifImgSelector).length > 0) {
      replaceNotificationIcon(notifImgSelector);
  $(notifImgSelector).on("load", function () {
    replaceNotificationIcon(notifImgSelector);
      observer.disconnect();
    }
  });
  // Set configuration object:
  const config = { childList: true, subtree: true };
  // Start the observer
  observer.observe(target, config);
}

function replaceActivityIcons() {
@@ -110,7 +118,7 @@ function replaceActivityIcons() {
    comments: getSvgLinkCore("actions", "comment", ""),
    deck: getSvgLinkApp("deck", "deck-dark", ""),
    contacts: getSvgLinkCore("places", "contacts", ""),
    user_settings: getSvgLinkApp("e-user-support-center", "app", "")
    user_settings: getSvgLinkApp("e-user-support-center", "app", ""),
  };

  let currentActive = "";
@@ -266,6 +274,6 @@ $(document).ready(function () {
      replaceSettingsSectionIcons();
    }
  }
  $('#app-navigation [data-id="trashbin"]').removeClass('pinned first-pinned');
  $('#app-navigation [id="quota"]').addClass('pinned first-pinned');
  $('#app-navigation [data-id="trashbin"]').removeClass("pinned first-pinned");
  $('#app-navigation [id="quota"]').addClass("pinned first-pinned");
});