forked from AkkomaGang/akkoma-fe
:/
This commit is contained in:
parent
589d8ea29f
commit
18be86a8db
4 changed files with 9 additions and 8 deletions
|
|
@ -118,13 +118,17 @@ const UserProfile = {
|
|||
media: 'media'
|
||||
}
|
||||
|
||||
if (this.favoritesTabVisible) timelineTabMap['favorites'] = 'favorites'
|
||||
if (this.isUs) {
|
||||
timelineTabMap['favorites'] = 'favorites'
|
||||
} else if (!this.user.hide_favorites) {
|
||||
timelineTabMap['favorites'] = 'publicFavorites'
|
||||
}
|
||||
|
||||
const timeline = timelineTabMap[nextTab]
|
||||
|
||||
if (timeline) {
|
||||
this.stopFetching()
|
||||
this.$store.dispatch('startFetchingTimeline', { timeline: timeline, userId: nextTab == 'favorites' && this.isUs ? null : this.userId })
|
||||
this.$store.dispatch('startFetchingTimeline', { timeline: timeline, userId: this.userId })
|
||||
}
|
||||
},
|
||||
load (userNameOrId) {
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@
|
|||
:title="$t('user_card.favorites')"
|
||||
timeline-name="favorites"
|
||||
:timeline="favorites"
|
||||
:user-id="isUs ? undefined : userId"
|
||||
:user-id="userId"
|
||||
:in-profile="true"
|
||||
:footer-slipgate="footerRef"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ export const defaultState = () => ({
|
|||
public: emptyTl(),
|
||||
user: emptyTl(),
|
||||
favorites: emptyTl(),
|
||||
publicFavorites: emptyTl(),
|
||||
media: emptyTl(),
|
||||
publicAndExternal: emptyTl(),
|
||||
friends: emptyTl(),
|
||||
|
|
@ -314,7 +315,7 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
|||
})
|
||||
|
||||
// Keep the visible statuses sorted
|
||||
if (timeline && !(['bookmarks', 'favorites'].includes(timeline))) {
|
||||
if (timeline && !(['bookmarks', 'favorites', 'publicFavorites'].includes(timeline))) {
|
||||
sortTimeline(timelineObject)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -719,10 +719,6 @@ const fetchTimeline = ({
|
|||
|
||||
let url = timelineUrls[timeline]
|
||||
|
||||
if (timeline === 'favorites' && userId) {
|
||||
url = timelineUrls.publicFavorites(userId)
|
||||
}
|
||||
|
||||
if (timeline === 'user' || timeline === 'media' || timeline === 'replies') {
|
||||
url = url(userId)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue