misc: remove dead code

This commit is contained in:
Xyphyn committed 2023-10-02 17:40:34 -07:00
1 parent 366b1ef29e
commit d2a7b1a7df
1 file changed
+3 -43
+3 -43
View File
@@ -1,25 +1,16 @@
<script lang="ts"> <script lang="ts">
import { goto } from '$app/navigation'
import Comment from '$lib/components/lemmy/comment/Comment.svelte' import Comment from '$lib/components/lemmy/comment/Comment.svelte'
import Markdown from '$lib/components/markdown/Markdown.svelte'
import UserLink from '$lib/components/lemmy/user/UserLink.svelte' import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
import { getClient } from '$lib/lemmy.js' import { getClient } from '$lib/lemmy.js'
import { profile } from '$lib/auth.js' import { profile } from '$lib/auth.js'
import type { import { Check, Icon } from 'svelte-hero-icons'
CommentReplyView, import { Material } from 'mono-svelte'
PersonMentionView,
PrivateMessageView,
} from 'lemmy-js-client'
import { ChatBubbleOvalLeft, Check, Icon } from 'svelte-hero-icons'
import { page } from '$app/stores'
import { Material, Modal, toast } from 'mono-svelte'
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte' import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
import SectionTitle from '$lib/components/ui/SectionTitle.svelte' import SectionTitle from '$lib/components/ui/SectionTitle.svelte'
import { Button } from 'mono-svelte' import { Button } from 'mono-svelte'
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
import RelativeDate from '$lib/components/util/RelativeDate.svelte' import RelativeDate from '$lib/components/util/RelativeDate.svelte'
import { publishedToDate } from '$lib/components/util/date.js' import { publishedToDate } from '$lib/components/util/date.js'
import type { InboxItem, InboxItemView } from '$lib/lemmy/inbox.js' import type { InboxItem } from '$lib/lemmy/inbox.js'
import PrivateMessage from '$lib/components/lemmy/inbox/PrivateMessage.svelte' import PrivateMessage from '$lib/components/lemmy/inbox/PrivateMessage.svelte'
import PrivateMessageModal from '$lib/components/lemmy/modal/PrivateMessageModal.svelte' import PrivateMessageModal from '$lib/components/lemmy/modal/PrivateMessageModal.svelte'
@@ -29,37 +20,6 @@
let reply = '' let reply = ''
let loading = false let loading = false
async function replyToMessage(
message: PrivateMessageView | CommentReplyView | PersonMentionView
) {
if (!$profile?.jwt) return
loading = true
try {
await getClient().createPrivateMessage({
content: reply,
recipient_id: message.creator.id,
})
toast({
content: 'Successfully replied to that message.',
type: 'success',
})
replying = false
goto($page.url, {
invalidateAll: true,
replaceState: true,
})
} catch (error) {
toast({ content: error as any, type: 'error' })
}
loading = false
}
async function markAsRead(isRead: boolean) { async function markAsRead(isRead: boolean) {
if (!$profile?.jwt) return if (!$profile?.jwt) return