优化聊天样式

This commit is contained in:
RockYang
2023-04-19 18:07:38 +08:00
parent a13c1bc669
commit 3e088cb76f
2 changed files with 22 additions and 63 deletions

View File

@@ -85,3 +85,11 @@ export function setChat(chat) {
chatList[chat.id] = chat;
Storage.set(ChatListKey, chatList);
}
export function removeChat(chatId) {
const chatList = Storage.get(ChatListKey);
if (chatList) {
delete chatList[chatId];
Storage.set(ChatListKey, chatList);
}
}