diff options
| author | Brenden Bice <brenden.next@gmail.com> | 2019-04-05 14:31:54 -0400 |
|---|---|---|
| committer | Brenden Bice <brenden.next@gmail.com> | 2019-04-11 23:26:13 -0400 |
| commit | 7dea2d470ebb216810febc3f3432fce0a11dfcef (patch) | |
| tree | 52ea4618a84f128c578471952dc47465af148952 /src | |
| parent | 80ba4f27c8109be6871a8c2b539cbb392eb8513f (diff) | |
remove duplicates from avatars list
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/status/status.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index b275d4fa..6d1f110a 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -12,7 +12,7 @@ import generateProfileLink from 'src/services/user_profile_link_generator/user_p import fileType from 'src/services/file_type/file_type.service' import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js' import { mentionMatchesUrl, extractTagFromUrl } from 'src/services/matcher/matcher.service.js' -import { filter, find, unescape } from 'lodash' +import { filter, find, unescape, uniqBy } from 'lodash' const Status = { name: 'Status', @@ -260,10 +260,11 @@ const Status = { return this.status.summary_html + '<br />' + this.status.statusnet_html }, combinedFavsAndRepeatsAvatars () { - return [].concat( + const combinedAvatars = [].concat( this.statusoid.favoritedBy ? this.statusoid.favoritedBy : [], this.statusoid.rebloggedBy ? this.statusoid.rebloggedBy : [] ) + return uniqBy(combinedAvatars, 'id') } }, components: { |
