Remove unnecessary related_notes call and let it update async

What does this MR do and why?

I attempted to solve this by adding a new index via !219465 (closed), but it's not preferred given notes already has many indexes.

So I looked at the code again and realized that we don't really need to call this at all here since we already update this notes count asynchronously. We can just set it to 0 and let the frontend to update it as it load notes. We could set it to - instead to denote that it's not loaded yet, but I chose 0 for now as it also makes sense until notes get loaded.

There was a small edge cases where the counts sometimes doesn't get updated if the notes were loaded sooner so I'm setting it immediately during init.

References

#585822 (closed)

Screenshots or screen recordings

See the notes count being updated async below.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #585822 (closed)

Edited by Sincheol (David) Kim

Merge request reports

Loading