mirror of
https://github.com/status-im/status-web-archive.git
synced 2025-01-09 23:56:01 +00:00
Return new array on emit to trigger re-rendering in react (#273)
* fix type * return new array to trigger re-rendering in react
This commit is contained in:
parent
f62e3ff014
commit
fade36ec54
@ -120,7 +120,7 @@ export class Chat {
|
||||
const startTime = options.start
|
||||
const endTime = new Date()
|
||||
|
||||
let _oldestClock: BigInt | undefined
|
||||
let _oldestClock: bigint | undefined
|
||||
let _oldestMessageTime: Date | undefined
|
||||
|
||||
if (this.messages.length) {
|
||||
@ -169,7 +169,7 @@ export class Chat {
|
||||
|
||||
public emitMessages = (messages: ChatMessage[]) => {
|
||||
// fixme!: don't emit on backfill
|
||||
this.messageCallbacks.forEach(callback => callback(messages))
|
||||
this.messageCallbacks.forEach(callback => callback([...messages]))
|
||||
}
|
||||
|
||||
public handleChange = (description: CommunityChat) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user