Hello, in my app, which is a twitter clone, what I do is I post a tweet and also I listen to realtime to get my latest tweet inside of my app feeds.
I setup the real time using riverpod's streamProvider and I use ref.watch to listen to it. So, when I post a tweet I get multiple instances of my tweet but when I restart the app everything is okay, only one instance of the tweet is shown.
There's a bug with realtime and subscribing multiple times: https://github.com/appwrite/sdk-for-flutter/issues/156
As a reminder, please make sure to search previous <#1072905050399191082> posts before posting.
Thankyou, sure I will.
There is a solution to,to prior adding new tweet to old tweets, first check if it was added earlier from previous realtime subscription. As of my expeirence we get four events when we subscribe to realtime, and as a result Document (Tweet in your case) is added multiple times to List (Builder).
You can clear your concept from this snippet
Thankyou @Hassanmrwt , I will check it out soon π
Recommended threads
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...