Implement Workspace::unfollow
This also changes the structure of the follow state back to be per-pane. This is because we can't share the same view state across different panes for a couple of reasons: - Rendering the same view in N different panes is almost always not something that we want due to global state such as focus. - If we allowed it and a user followed the same person in two different panes, there would be no way of unfollowing in one pane without also unfollowing in the other.
This commit is contained in:
parent
a2dbebd9ba
commit
a154e4500b
3 changed files with 237 additions and 126 deletions
|
@ -3542,6 +3542,13 @@ impl<T> PartialEq<ViewHandle<T>> for WeakViewHandle<T> {
|
|||
|
||||
impl<T> Eq for ViewHandle<T> {}
|
||||
|
||||
impl<T> Hash for ViewHandle<T> {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.window_id.hash(state);
|
||||
self.view_id.hash(state);
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Debug for ViewHandle<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct(&format!("ViewHandle<{}>", type_name::<T>()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue