支持一键已读
This commit is contained in:
1 parent
fd0db6e306
commit
c09128b83e
8 files changed
+110
No files matched your search
@@ -978,6 +978,23 @@ class ChatService {
|
||||
}
|
||||
}
|
||||
|
||||
async markAllSessionsRead(): Promise<{ success: boolean; error?: string }> {
|
||||
try {
|
||||
const connectResult = await this.ensureConnected()
|
||||
if (!connectResult.success) {
|
||||
return { success: false, error: connectResult.error }
|
||||
}
|
||||
const result = await wcdbService.markAllSessionsRead()
|
||||
if (result.success) {
|
||||
this.syntheticUnreadState.clear()
|
||||
}
|
||||
return result
|
||||
} catch (e) {
|
||||
console.error('ChatService: 一键已读失败:', e)
|
||||
return { success: false, error: String(e) }
|
||||
}
|
||||
}
|
||||
|
||||
private getSessionUsername(row: Record<string, any>): string {
|
||||
return String(
|
||||
row.username ||
|
||||
|
||||
Reference in new issue
Block a user