FIX: Remove social sharing icons from private contexts (PR #10213)

This removes Twitter/Facebook icons in the share dialogs when:

  • in a login-required site
  • in a private message

Themes/plugins can use the new showInPrivateContext option to add their source to these private contexts.

GitHub

Should we compute on topic.isPrivateMessage instead of just topic here?

Also why use @discourseComputed if we call this.topic directly?

Do we need to compute on this.topic.isPrivateMessage here ?

:+1: computing on topic.isPrivateMessage is cleaner.

To the second question, we need to compute this, otherwise when navigating from public to private topic this won’t get recalculated.