forked from AkkomaGang/akkoma-fe
Compare commits
2 commits
0e86f707ff
...
0dbe31cf31
Author | SHA1 | Date | |
---|---|---|---|
0dbe31cf31 | |||
|
be20668f1f |
5 changed files with 26 additions and 3 deletions
|
@ -58,6 +58,9 @@ const UserProfile = {
|
|||
timeline () {
|
||||
return this.$store.state.statuses.timelines.user
|
||||
},
|
||||
replies () {
|
||||
return this.$store.state.statuses.timelines.replies
|
||||
},
|
||||
favorites () {
|
||||
return this.$store.state.statuses.timelines.favorites
|
||||
},
|
||||
|
@ -101,6 +104,7 @@ const UserProfile = {
|
|||
const loadById = (userId) => {
|
||||
this.userId = userId
|
||||
startFetchingTimeline('user', userId)
|
||||
startFetchingTimeline('replies', userId)
|
||||
startFetchingTimeline('media', userId)
|
||||
if (this.isUs) {
|
||||
startFetchingTimeline('favorites', userId)
|
||||
|
@ -138,6 +142,7 @@ const UserProfile = {
|
|||
},
|
||||
stopFetching () {
|
||||
this.$store.dispatch('stopFetchingTimeline', 'user')
|
||||
this.$store.dispatch('stopFetchingTimeline', 'replies')
|
||||
this.$store.dispatch('stopFetchingTimeline', 'favorites')
|
||||
this.$store.dispatch('stopFetchingTimeline', 'media')
|
||||
},
|
||||
|
|
|
@ -79,6 +79,18 @@
|
|||
:in-profile="true"
|
||||
:footer-slipgate="footerRef"
|
||||
/>
|
||||
<Timeline
|
||||
key="replies"
|
||||
:label="$t('user_card.replies')"
|
||||
:count="user.statuses_count"
|
||||
:embedded="true"
|
||||
:title="$t('user_card.replies')"
|
||||
:timeline="replies"
|
||||
timeline-name="replies"
|
||||
:user-id="userId"
|
||||
:in-profile="true"
|
||||
:footer-slipgate="footerRef"
|
||||
/>
|
||||
<div
|
||||
v-if="followsTabVisible"
|
||||
key="followees"
|
||||
|
|
|
@ -910,6 +910,7 @@
|
|||
"muted": "Muted",
|
||||
"per_day": "per day",
|
||||
"remote_follow": "Remote follow",
|
||||
"replies": "With Replies",
|
||||
"report": "Report",
|
||||
"statuses": "Statuses",
|
||||
"subscribe": "Subscribe",
|
||||
|
|
|
@ -64,7 +64,8 @@ export const defaultState = () => ({
|
|||
dms: emptyTl(),
|
||||
bookmarks: emptyTl(),
|
||||
list: emptyTl(),
|
||||
bubble: emptyTl()
|
||||
bubble: emptyTl(),
|
||||
replies: emptyTl()
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -183,7 +184,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
|||
// This makes sure that user timeline won't get data meant for other
|
||||
// user. I.e. opening different user profiles makes request which could
|
||||
// return data late after user already viewing different user profile
|
||||
if ((timeline === 'user' || timeline === 'media') && timelineObject.userId !== userId) {
|
||||
if ((timeline === 'user' || timeline === 'media' || timeline === 'replies') && timelineObject.userId !== userId) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -616,6 +616,7 @@ const fetchTimeline = ({
|
|||
notifications: MASTODON_USER_NOTIFICATIONS_URL,
|
||||
'publicAndExternal': MASTODON_PUBLIC_TIMELINE,
|
||||
user: MASTODON_USER_TIMELINE_URL,
|
||||
replies: MASTODON_USER_TIMELINE_URL,
|
||||
media: MASTODON_USER_TIMELINE_URL,
|
||||
list: MASTODON_LIST_TIMELINE_URL,
|
||||
favorites: MASTODON_USER_FAVORITES_TIMELINE_URL,
|
||||
|
@ -627,7 +628,7 @@ const fetchTimeline = ({
|
|||
|
||||
let url = timelineUrls[timeline]
|
||||
|
||||
if (timeline === 'user' || timeline === 'media') {
|
||||
if (timeline === 'user' || timeline === 'media' || timeline === 'replies') {
|
||||
url = url(userId)
|
||||
}
|
||||
|
||||
|
@ -659,6 +660,9 @@ const fetchTimeline = ({
|
|||
if (replyVisibility !== 'all') {
|
||||
params.push(['reply_visibility', replyVisibility])
|
||||
}
|
||||
if (timeline === 'user') {
|
||||
params.push(['exclude_replies', 1])
|
||||
}
|
||||
|
||||
params.push(['limit', 20])
|
||||
|
||||
|
|
Loading…
Reference in a new issue