private void addNotificationIfApplicable() {
    var notificationElement = myNotificationElement.getAndSet(null);
    if (notificationElement != null && AdvancedSettings.getBoolean("search.everywhere.show.results.notification")) {
      var lastItemIndex = listElements.size() - 1;
      listElements.removeIf(info -> info.getElement() instanceof ResultsNotificationElement);
      var newLastItemIndex = listElements.size() - 1;
      if (newLastItemIndex < lastItemIndex) {
        fireIntervalRemoved(this, 0, lastItemIndex - newLastItemIndex - 1);
      }

      listElements.add(notificationElement);
      newLastItemIndex++;
      fireIntervalAdded(this, newLastItemIndex, newLastItemIndex);
      if (myMaxFrozenIndex != -1) {
        myMaxFrozenIndex++;
      }
    }
  }
private void addNotificationIfApplicable()