fix: only check FileDialog location existence during navigation (#1196)

* Make DriveListLoader always async instead of usually async

* Simplify code

* Only check location existence during navigation
This commit is contained in:
Kara 2023-05-12 19:10:00 -07:00 committed by GitHub
parent 48c00da429
commit 69b615f218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 27 deletions

View file

@ -31,7 +31,6 @@ public partial class FileDialog
this.Text = text;
this.Location = location;
this.Icon = icon;
this.Exists = !this.Location.IsNullOrEmpty() && Directory.Exists(this.Location);
}
public string Text { get; init; }
@ -40,8 +39,6 @@ public partial class FileDialog
public FontAwesomeIcon Icon { get; init; }
public bool Exists { get; init; }
public bool CheckExistence()
=> !this.Location.IsNullOrEmpty() && Directory.Exists(this.Location);
}