Remove ViewContext::dispatch_any_action
This commit is contained in:
parent
029538fe21
commit
d815fc88ae
11 changed files with 197 additions and 202 deletions
|
@ -1745,7 +1745,7 @@ impl AppContext {
|
|||
self.pending_effects.push_back(Effect::RefreshWindows);
|
||||
}
|
||||
|
||||
pub fn dispatch_action_at(&mut self, window_id: usize, view_id: usize, action: impl Action) {
|
||||
fn dispatch_action_at(&mut self, window_id: usize, view_id: usize, action: impl Action) {
|
||||
self.dispatch_any_action_at(window_id, view_id, Box::new(action));
|
||||
}
|
||||
|
||||
|
@ -3196,13 +3196,6 @@ impl<'a, 'b, V: View> ViewContext<'a, 'b, V> {
|
|||
.dispatch_action_at(window_id, view_id, action)
|
||||
}
|
||||
|
||||
pub fn dispatch_any_action(&mut self, action: Box<dyn Action>) {
|
||||
let window_id = self.window_id;
|
||||
let view_id = self.view_id;
|
||||
self.window_context
|
||||
.dispatch_any_action_at(window_id, view_id, action)
|
||||
}
|
||||
|
||||
pub fn defer(&mut self, callback: impl 'static + FnOnce(&mut V, &mut ViewContext<V>)) {
|
||||
let handle = self.handle();
|
||||
self.window_context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue