Allow direct read/update of WeakViewHandle only in AsyncAppContext
This commit is contained in:
@@ -2005,11 +2005,11 @@ impl NavHistory {
|
||||
}
|
||||
|
||||
fn did_update(&self, cx: &mut WindowContext) {
|
||||
let pane = self.pane.clone();
|
||||
cx.defer(move |cx| {
|
||||
pane.update(cx, |pane, cx| pane.history_updated(cx))
|
||||
.log_err();
|
||||
});
|
||||
if let Some(pane) = self.pane.upgrade(cx) {
|
||||
cx.defer(move |cx| {
|
||||
pane.update(cx, |pane, cx| pane.history_updated(cx));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user