Move more window-specific methods from AppContext to WindowContext

This commit is contained in:
Antonio Scandurra 2023-04-14 10:29:35 +02:00
parent c62357db02
commit 9ef79735dc
10 changed files with 369 additions and 356 deletions

View file

@ -43,7 +43,7 @@ impl CommandPalette {
pub fn new(focused_view_id: usize, cx: &mut ViewContext<Self>) -> Self {
let this = cx.weak_handle();
let actions = cx
.available_actions(cx.window_id(), focused_view_id)
.available_actions(focused_view_id)
.filter_map(|(name, action, bindings)| {
if cx.has_global::<CommandPaletteFilter>() {
let filter = cx.global::<CommandPaletteFilter>();