Fix bug in follower updates for non-project items
This commit is contained in:
parent
555c9847d4
commit
973f03e73e
2 changed files with 44 additions and 21 deletions
|
@ -404,6 +404,7 @@ impl<T: Item> ItemHandle for ViewHandle<T> {
|
|||
if let Some(followed_item) = self.to_followable_item_handle(cx) {
|
||||
if let Some(message) = followed_item.to_state_proto(cx) {
|
||||
workspace.update_followers(
|
||||
followed_item.is_project_item(cx),
|
||||
proto::update_followers::Variant::CreateView(proto::View {
|
||||
id: followed_item
|
||||
.remote_id(&workspace.app_state.client, cx)
|
||||
|
@ -439,6 +440,7 @@ impl<T: Item> ItemHandle for ViewHandle<T> {
|
|||
};
|
||||
|
||||
if let Some(item) = item.to_followable_item_handle(cx) {
|
||||
let is_project_item = item.is_project_item(cx);
|
||||
let leader_id = workspace.leader_for_pane(&pane);
|
||||
|
||||
if leader_id.is_some() && item.should_unfollow_on_event(event, cx) {
|
||||
|
@ -458,6 +460,7 @@ impl<T: Item> ItemHandle for ViewHandle<T> {
|
|||
move |this, cx| {
|
||||
pending_update_scheduled.store(false, Ordering::SeqCst);
|
||||
this.update_followers(
|
||||
is_project_item,
|
||||
proto::update_followers::Variant::UpdateView(
|
||||
proto::UpdateView {
|
||||
id: item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue