fix: 打開不同對話時, 使用了同一個 ChatFragment

* 並修復了使用 key 時, 因爲卸載組件后 ref 丟失導致的錯誤
This commit is contained in:
CrescentLeaf
2025-09-25 16:26:46 +08:00
parent 4b93e5fd67
commit a928577f2a
3 changed files with 4 additions and 2 deletions

View File

@@ -109,6 +109,7 @@ export default function AppMobile() {
<ChatFragment
showReturnButton={true}
onReturnButtonClicked={() => setIsShowChatFragment(false)}
key={currentChatId}
target={currentChatId} />
</div>
</mdui-dialog>