refac/fix: temp chat
This commit is contained in:
1 parent
af34e414e1
commit
3a601e0fc3
6 files changed
+145
-114
No files matched your search
@@ -2207,8 +2207,8 @@
|
||||
|
||||
selectedFolder.set(null);
|
||||
} else {
|
||||
_chatId = 'local';
|
||||
await chatId.set('local');
|
||||
_chatId = `local:${$socket?.id}`; // Use socket id for temporary chat
|
||||
await chatId.set(_chatId);
|
||||
}
|
||||
await tick();
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if $temporaryChatEnabled && $chatId === 'local'}
|
||||
{#if $temporaryChatEnabled && ($chatId ?? '').startsWith('local:')}
|
||||
<div class=" w-full z-30 text-center">
|
||||
<div class="text-xs text-gray-500">{$i18n.t('Temporary Chat')}</div>
|
||||
</div>
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
if (chat.id) {
|
||||
let chatObj = null;
|
||||
|
||||
if (chat.id === 'local' || $temporaryChatEnabled) {
|
||||
if ((chat?.id ?? '').startsWith('local') || $temporaryChatEnabled) {
|
||||
chatObj = chat;
|
||||
} else {
|
||||
chatObj = await getChatById(localStorage.token, chat.id);
|
||||
|
||||
Reference in new issue
Block a user