It doesn't matter what file it's in...it can still happen multiple times
[SOLVED] realtime calls the function multiple times when detected change
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 3: Container
Oh alright
Rank 3: Container
What seems to be the issue?
Rank 3: Container
Its my first time ever doing realtime sorry
I don't know. Like I said, you may be calling subscribe multiple times
Rank 3: Container
I've tried unsubscribing but then after I unsubscribe I do not get callbacks
So how many of these come through and are the events the same?
Rank 3: Container
No it increases each time
Rank 3: Container
The amount went from 16 to 23 (I just counted)
Rank 3: Container
The event are the same it's the callback that gets called
What amount?
Rank 3: Container
The callbacks
Definitely sounds like you're subscribing multiple times without unsubscribing
Rank 3: Container
^
Rank 3: Container
Is there a way to re subscribe when there's a change?
No, that's not the solution
Rank 3: Container
Hmm
Rank 3: Container
What do I do?
Rank 3: Container
Because after unsubscribing you get no callbacks
Rank 3: Container
And you can't re subscribe either
Rank 3: Container
Do I put an unsubscribe call inside the function
Rank 3: Container
?
sorry, i don't know. it depends on your logic
Rank 3: Container
Thanks for ur help during the Office Hours I managed to solve the issue. I jsut got the change from the Payload and did it that way rather than calling the function.
Rank 3: Container
[SOLVED] realtime calls the function multiple times when detected change