Commit 5a402b5a authored by Joel's avatar Joel

feat: handle remove current conversation

parent 25440279
......@@ -142,6 +142,9 @@ const Main: FC<IMainProps> = ({
await delConversation(isInstalledApp, installedAppInfo?.id, toDeleteConversationId)
notify({ type: 'success', message: t('common.api.success') })
hideConfirm()
if (currConversationId === toDeleteConversationId)
handleConversationIdChange('-1')
noticeUpdateList()
}
......
......@@ -102,7 +102,7 @@ const Sidebar: FC<ISidebarProps> = ({
<div className='mt-4 px-4'>
<div className='mb-1.5 leading-[18px] text-xs text-gray-500 font-medium uppercase'>{t('share.chat.pinnedTitle')}</div>
<List
className={maxListHeight}
className={cn(list.length > 0 ? maxListHeight : 'flex-grow')}
currentId={currentId}
onCurrentIdChange={onCurrentIdChange}
list={pinnedList}
......@@ -120,7 +120,7 @@ const Sidebar: FC<ISidebarProps> = ({
)}
{/* unpinned list */}
<div className='mt-4 px-4'>
{hasPinned && (
{(hasPinned && list.length > 0) && (
<div className='mb-1.5 leading-[18px] text-xs text-gray-500 font-medium uppercase'>{t('share.chat.unpinnedTitle')}</div>
)}
<List
......@@ -139,6 +139,7 @@ const Sidebar: FC<ISidebarProps> = ({
onDelete={onDelete}
/>
</div>
</div>
<div className="flex flex-shrink-0 pr-4 pb-4 pl-4">
<div className="text-gray-400 font-normal text-xs">© {copyRight} {(new Date()).getFullYear()}</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment