perf(toast): show synced message count in history sync notification

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
molvqingtai
2025-10-07 05:30:59 +08:00
parent 09adb7dfba
commit 0dd074c100

View File

@@ -42,7 +42,11 @@ const ToastDomain = Remesh.domain({
name: 'Toast.OnSyncHistoryEffect',
impl: ({ fromEvent }) => {
const onSyncHistory$ = fromEvent(chatRoomDomain.event.OnSyncMessageEvent).pipe(
map((message) => toastModule.command.SuccessCommand('Syncing history messages.'))
map((messages) =>
toastModule.command.SuccessCommand(
`Synced ${messages.length} history message${messages.length > 1 ? 's' : ''}.`
)
)
)
return onSyncHistory$