Move methods querying window state into AsyncAppContext
This commit is contained in:
parent
4f6939732e
commit
70f8cf4cf6
9 changed files with 116 additions and 113 deletions
|
@ -182,7 +182,11 @@ impl TestAppContext {
|
|||
}
|
||||
|
||||
pub fn window_ids(&self) -> Vec<usize> {
|
||||
self.cx.borrow().window_ids().collect()
|
||||
self.cx.borrow().windows.keys().copied().collect()
|
||||
}
|
||||
|
||||
pub fn remove_all_windows(&mut self) {
|
||||
self.update(|cx| cx.windows.clear());
|
||||
}
|
||||
|
||||
pub fn read<T, F: FnOnce(&AppContext) -> T>(&self, callback: F) -> T {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue