title: UI5 remove duplicate feed list items
body: <p>I have a Feed List for posting comments in my UI5 xml view</p>
  
  <pre><code>&lt;layout:content&gt;
      &lt;m:FeedInput post="onFeedPost" class="sapUiSmallMarginTopBottom"/&gt;
      &lt;m:List id="feedList" showSeparators="Inner" items="{path: '/table', sorter: {path: 'DATE', descending: true}}"&gt;
          &lt;m:FeedListItem sender="{MEMBERID}" timestamp="{DATE}" text="{COMMENT}" convertLinksToAnchorTags="All"/&gt;
      &lt;/m:List&gt;
  &lt;/layout:content&gt;
  </code></pre>
  
  <p>I want to not display duplicate comments that have the same text and date, but keep them in the database. My idea was to in the controller iterate over over the items to do this, but I am not sure what to do with the resulting array</p>
  
  <pre><code>var results = [];
  var comments = feed.getItems();
  
  for (var n = 0; n &lt; comments.length - 1; n++) {
      var contained = false; 
  
      for (var m = n + 1; m &lt; comments.length; m++) {
          if (comments[n].getText() === comments[m].getText() &amp;&amp; 
              comments[n].getDate() === comments[m].getDate()) {
              comments.pop(m);
  
              contained = true;
  
              if (!results.includes(comments[n])) {
                  results.push(comments[n]);
              }
          }
      }
  
      if (!contained &amp;&amp; !results.includes(comments[n])) {
          results.push(comments[n]);
      }
  }
  
  // replace list items with results array
  </code></pre>
  
  <p>I can't figure out how to replace the feed list's items with the new array as there is a getItems function but not a setItems function. It occurs to me there is probably a simpler more idiomatic UI5 way to do this but I haven't found it yet.</p>