Don't add a quick actions toolbar item for non-editor views

Rather than adding primary toolbar item that renders as empty,
don't add an item at all. This prevents spurious spacing from
being added after other primary toolbar items.
This commit is contained in:
Max Brunsfeld 2023-08-28 14:16:41 -07:00
parent 9521f6da42
commit bb448b91d5

View File

@ -152,9 +152,10 @@ impl ToolbarItemView for QuickActionBar {
cx.notify();
}
}));
}
ToolbarItemLocation::PrimaryRight { flex: None }
} else {
ToolbarItemLocation::Hidden
}
}
None => {
self.active_item = None;