collab_panel: Fix favorite channels not surviving startup (#52541)
Danilo Leal
created
Follow up to https://github.com/zed-industries/zed/pull/52378
This PR fixes a little race condition that was happening where we were
running the favorite channel pruning function faster than the channels
could load, leading to favorite channels not surviving the app
restarting. The fix is to make the pruning happen only when the number
of channels is bigger than 0, which means the list from the server has
already been loaded.
Release Notes:
- N/A _(No release notes yet because this feature hasn't reached the
wider public)_