Fix handling of new files with new buffer/file structure

This commit is contained in:
Max Brunsfeld
2021-05-06 21:06:20 -07:00
parent 290fcb4c06
commit e6323f0d02
4 changed files with 51 additions and 78 deletions
+4
View File
@@ -339,6 +339,10 @@ impl TestAppContext {
pub fn simulate_new_path_selection(&self, result: impl FnOnce(PathBuf) -> Option<PathBuf>) {
self.1.as_ref().simulate_new_path_selection(result);
}
pub fn did_prompt_for_new_path(&self) -> bool {
self.1.as_ref().did_prompt_for_new_path()
}
}
impl UpdateModel for TestAppContext {
+4
View File
@@ -45,6 +45,10 @@ impl Platform {
.expect("prompt_for_new_path was not called");
callback(result(dir_path));
}
pub(crate) fn did_prompt_for_new_path(&self) -> bool {
self.last_prompt_for_new_path_args.borrow().is_some()
}
}
impl super::Platform for Platform {