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
- Does 1.9.0 Self Hosted have MongoDB Atla...
I have been playing with the new 1.9.0 update and I am really excited for the MongoDB support. I wanted to ask though if at the current time Appwrite supports b...
- {"code": 1008, "message": "Invalid Origi...
Nothing has changed in my application or console settings so I'm curious as to what I need to do to fix this. I already have the client registered so I'm not en...
- NEW ERROR Invalid document structure: At...
Error: ```AppwriteException: document_invalid_structure, Invalid document structure: Attribute "pb.kmsgxPkgInfo.id_info" must be an array (400)``` Iβm encounter...