Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well you certainly have a race condition. If you manage to send two requests and have a very slowly responding server you might get the same tweet twice. I'm not sure if that's the problem in your case but it certainly is an option.</p> <p>Given this is the source of your problem, you have at least two options to solve it:</p> <ul> <li>Maintain some flag that would indicate whether you're in a process of waiting for a server response. This will allow you to prevent sending two requests concurrently from the same client instance. NOTE: This is not the same as synchonous requests. The latter blocks your UI!</li> <li>You could also check whether a tweet with the returned id already exists and only then proceed. However this is a little bit dangerous because it might hide a deeper problem with your implementation.</li> </ul> <p><strong>EDIT</strong></p> <p>I think you're problem is simply that url <code>/timeline/SOME-ID-HERE</code> returns all the newest tweets until the given id <strong>inclusive</strong>. I've checked the contents of the requests that your applications sends. The first one <code>/timeline</code> is long and ends with an id <code>119912841942802432</code>. And this is the only id that is returned in your second request.</p> <p>What I don't understand is how does the ID in the address relate to ids of your tweets. The second request address is <code>/timeline/119912841942802430</code>. On the other hand <code>119912841942802430</code> doesn't match anything in the results. <code>119912841942802432</code> (notice <code>2</code> instead of <code>0</code> at the end) does.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload