cabal-club / cabal-client

interface for writing peer-to-peer chat clients
GNU General Public License v3.0
95 stars 14 forks source link

`init` event should wait the for indexer before before firing #33

Closed nikolaiwarner closed 4 years ago

nikolaiwarner commented 4 years ago

On a client, calling functions like cabalDetails.getUsers() immediately after the init event would return an empty set of users/channels/etc. Waiting a few seconds, then cabalDetails.getUsers() does have content.

from @okdistribute:

ideally this should be a 'ready' event from some lower-level module, i bet it will need to come from the indexer -- which should already be there somewhere. a timeout will give different results on different computers, slow computers or those with spinning disks might not be able to complete the necessary steps in 2 seconds with large cabals

hackergrrl commented 4 years ago

Is this still true @nikolaiwarner?

nikolaiwarner commented 4 years ago

Desktop isnt relying on the init event anymore so I think we're all good!