Separated Posts & Replies (#145) (#148)

Co-authored-by: David <dmgf2008@hotmail.com>
Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/148
Co-authored-by: Mergan <mergan@noreply.akkoma>
Co-committed-by: Mergan <mergan@noreply.akkoma>
This commit is contained in:
Mergan 2022-08-31 15:28:09 +00:00 committed by floatingghost
parent 7dc0464094
commit 48826ede36
5 changed files with 26 additions and 3 deletions

View file

@ -617,6 +617,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,
@ -628,7 +629,7 @@ const fetchTimeline = ({
let url = timelineUrls[timeline]
if (timeline === 'user' || timeline === 'media') {
if (timeline === 'user' || timeline === 'media' || timeline === 'replies') {
url = url(userId)
}
@ -660,6 +661,9 @@ const fetchTimeline = ({
if (replyVisibility !== 'all') {
params.push(['reply_visibility', replyVisibility])
}
if (timeline === 'user') {
params.push(['exclude_replies', 1])
}
params.push(['limit', 20])