fixed an empty notification about closing files

This commit is contained in:
antelle 2021-04-17 09:28:25 +02:00
parent e3f33b9d4c
commit de0cf0ce67
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
2 changed files with 6 additions and 0 deletions

View File

@ -233,6 +233,9 @@ class AppModel {
}
closeAllFiles() {
if (!this.files.hasOpenFiles()) {
return;
}
for (const file of this.files) {
file.close();
this.fileClosed(file);

View File

@ -615,6 +615,9 @@ class AppView extends View {
}
closeAllFilesAndShowFirst() {
if (!this.model.files.hasOpenFiles()) {
return;
}
let fileToShow = this.model.files.find(
(file) => !file.demo && !file.created && !file.skipOpenList
);