refac
This commit is contained in:
1 parent
34813573fa
commit
6e14d0d627
22 files changed
+249
-243
No files matched your search
@@ -1,19 +1,18 @@
|
||||
<script lang="ts">
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import {
|
||||
chats,
|
||||
config,
|
||||
settings,
|
||||
user as _user,
|
||||
mobile,
|
||||
currentChatPage,
|
||||
temporaryChatEnabled
|
||||
} from '$lib/stores';
|
||||
import { refreshChatList } from '$lib/stores/chat-list';
|
||||
import { tick, getContext, onMount, onDestroy, createEventDispatcher } from 'svelte';
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { deleteChatMessageById, getChatList, updateChatById } from '$lib/apis/chats';
|
||||
import { deleteChatMessageById, updateChatById } from '$lib/apis/chats';
|
||||
import { copyToClipboard, extractCurlyBraceWords } from '$lib/utils';
|
||||
|
||||
import Message from './Messages/Message.svelte';
|
||||
@@ -183,8 +182,7 @@
|
||||
history = history;
|
||||
}
|
||||
|
||||
currentChatPage.set(1);
|
||||
await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
||||
await refreshChatList(localStorage.token);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -484,8 +482,7 @@
|
||||
history = res.chat.history;
|
||||
}
|
||||
|
||||
currentChatPage.set(1);
|
||||
await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
||||
await refreshChatList(localStorage.token);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user