diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-04-30 17:39:33 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2019-04-30 17:39:33 +0000 |
| commit | a954f56e3444e921dcf5ff6651e443ac110f1804 (patch) | |
| tree | de2de7d792a17ccd1ac74773cd05f3d18c2de60e /src/components/status/status.js | |
| parent | 0f7f685c5e720d870cc732f07f68fb6eac278a68 (diff) | |
| parent | b1bd5bd08eccbe93d37aa1708692cad50003fd58 (diff) | |
Merge branch 'brendenbice1222/pleroma-fe-issues/pleroma-fe-202-show-boosted-users' into 'develop'
Show favoriting and repeating users in hilighted status
See merge request pleroma/pleroma-fe!768
Diffstat (limited to 'src/components/status/status.js')
| -rw-r--r-- | src/components/status/status.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 0295cd04..f10eb2e4 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -7,11 +7,12 @@ import UserCard from '../user_card/user_card.vue' import UserAvatar from '../user_avatar/user_avatar.vue' import Gallery from '../gallery/gallery.vue' import LinkPreview from '../link-preview/link-preview.vue' +import AvatarList from '../avatar_list/avatar_list.vue' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' 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', @@ -97,6 +98,10 @@ const Status = { return this.statusoid } }, + statusFromGlobalRepository () { + // NOTE: Consider to replace status with statusFromGlobalRepository + return this.$store.state.statuses.allStatusesObject[this.status.id] + }, loggedIn () { return !!this.$store.state.users.currentUser }, @@ -257,6 +262,14 @@ const Status = { return this.status.statusnet_html } return this.status.summary_html + '<br />' + this.status.statusnet_html + }, + combinedFavsAndRepeatsAvatars () { + // Use the status from the global status repository since favs and repeats are saved in it + const combinedAvatars = [].concat( + this.statusFromGlobalRepository.favoritedBy, + this.statusFromGlobalRepository.rebloggedBy + ) + return uniqBy(combinedAvatars, 'id') } }, components: { @@ -268,7 +281,8 @@ const Status = { UserCard, UserAvatar, Gallery, - LinkPreview + LinkPreview, + AvatarList }, methods: { visibilityIcon (visibility) { |
