Refactor topicManager.ts to use firstMessageHash

- Added condition to check for currentTopicId.
- Updated currentTopicId to use firstMessageHash.
This commit is contained in:
bobo.yang 2023-06-08 09:06:53 +08:00
parent d1921a34a7
commit 4d483a2096

View File

@ -231,6 +231,10 @@ export class TopicManager {
}
async loadTopics(): Promise<void> {
if (this.currentTopicId) {
this.currentTopicId = this.getTopic(this.currentTopicId)?.firstMessageHash;
}
this._topics = {};
const devChat = new DevChat();