Changeset 0.28.6 (#192)
This commit is contained in:
@@ -236,6 +236,8 @@ async function loadChats() {
|
||||
|
||||
async function selectChat(chatId) {
|
||||
clearStaged(); // Discard any staged files from previous chat
|
||||
// v0.28.6: Reset virtual scroll when switching conversations
|
||||
if (typeof VirtualScroll !== 'undefined') VirtualScroll.destroy();
|
||||
const chat = App.chats.find(c => c.id === chatId);
|
||||
App.setActive(chatId, chat?.type || 'direct');
|
||||
try { sessionStorage.setItem('cs-active-conversation', JSON.stringify(App.activeConversation)); } catch (_) {}
|
||||
@@ -418,6 +420,7 @@ function _cleanStaleChatModel(chatId) {
|
||||
|
||||
async function newChat() {
|
||||
clearStaged(); // Discard any staged files
|
||||
if (typeof VirtualScroll !== 'undefined') VirtualScroll.destroy();
|
||||
App.setActive(null);
|
||||
UI.renderChatList();
|
||||
UI.renderChannelsSection();
|
||||
|
||||
Reference in New Issue
Block a user