feat: add posts to dock as well
This commit is contained in:
1 parent
eb00921060
commit
a5b1591d74
7 files changed
+96
-29
No files matched your search
@@ -46,9 +46,14 @@
|
||||
import { feature } from '$lib/version.js'
|
||||
import { publishedToDate } from '$lib/components/util/date.js'
|
||||
import PostMedia from '$lib/components/lemmy/post/media/PostMedia.svelte'
|
||||
import { mediaType } from '$lib/components/lemmy/post/helpers.js'
|
||||
import {
|
||||
bestImageURL,
|
||||
mediaType,
|
||||
optimizeImageURL,
|
||||
} from '$lib/components/lemmy/post/helpers.js'
|
||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||
import Expandable from '$lib/components/ui/Expandable.svelte'
|
||||
import { addResumable } from '$lib/lemmy/item.js'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -80,6 +85,21 @@
|
||||
duration: 9999 * 1000,
|
||||
})
|
||||
}
|
||||
if ($profile) {
|
||||
addResumable({
|
||||
avatar: post.post_view.post.thumbnail_url
|
||||
? optimizeImageURL(post.post_view.post.thumbnail_url, 64)
|
||||
: undefined,
|
||||
id: post.post_view.post.id,
|
||||
url: $page.url,
|
||||
name: post.post_view.post.name,
|
||||
type: 'post',
|
||||
subdivision: {
|
||||
name: post.post_view.community.name,
|
||||
avatar: post.post_view.community.icon,
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const fetchOnHome = async (jwt: string) => {
|
||||
|
||||
Reference in new issue
Block a user