feat: add v0.19.0 support

This commit is contained in:
Xyphyn committed 2023-09-28 17:09:09 -07:00
1 parent b3b8a10e44
commit 119ab53946
62 files changed
+188 -157

No files matched your search

+2 -1
View File
@@ -1,4 +1,5 @@
import { instance } from '$lib/instance.js'
import { getInstance } from '$lib/lemmy.js'
import { error, redirect } from '@sveltejs/kit'
import { get } from 'svelte/store'
@@ -6,7 +7,7 @@ export function load({ params, url }) {
if (Number(params.instance)) {
const split = url.pathname.split('/')
split.splice(2, 0, `${get(instance)?.toLowerCase()}`)
split.splice(2, 0, `${getInstance()?.toLowerCase()}`)
const newUrl = new URL(url)
newUrl.pathname = split.join('/')
@@ -42,7 +42,6 @@
$profile?.jwt
) {
getClient().markPostAsRead({
auth: $profile.jwt,
read: $userSettings.markPostsAsRead,
post_id: post.post_view.post.id,
})
@@ -73,7 +72,6 @@
try {
const res = await getClient().resolveObject({
auth: jwt,
q: post.post_view.post.ap_id,
})
@@ -98,7 +96,6 @@
commentsPage = 1
data.streamed.comments = getClient().getComments({
auth: $profile?.jwt,
page: 1,
limit: 25,
type_: 'All',
@@ -8,7 +8,6 @@ import { get } from 'svelte/store'
export async function load({ params, url, fetch }) {
const post = await getClient(params.instance.toLowerCase(), fetch).getPost({
id: Number(params.id),
auth: get(profile)?.jwt,
})
let max_depth = post.post_view.counts.comments > 100 ? 1 : 3
@@ -38,7 +37,6 @@ export async function load({ params, url, fetch }) {
max_depth: max_depth,
saved_only: false,
sort: sort,
auth: get(profile)?.jwt,
parent_id: parentId,
}