Browse Source

Added Check for Digital Form Cache Folder
Tweaked DefaultGeolocation event handler

frogsoftware 1 month ago
parent
commit
5abc3035d8

+ 1 - 1
InABox.Avalonia.Platform/Geolocation/DefaultGeolocation.cs

@@ -109,7 +109,7 @@ public class DefaultGeolocation : INotifyPropertyChanged, IGeolocation
     
     #region INotifyPropertyChanged
     
-    public event PropertyChangedEventHandler? PropertyEdited;
+    public event PropertyChangedEventHandler? PropertyChanged;
 
     protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null)
     {

+ 1 - 2
InABox.Core/DigitalForms/DigitalFormDocumentFactory.cs

@@ -94,8 +94,7 @@ namespace InABox.Core
                     {
                         try
                         {
-                            var file = Directory.EnumerateFiles(CachePath, "*.formdocument")
-                                .FirstOrDefault();
+                            var file = Directory.Exists(CachePath) ? Directory.EnumerateFiles(CachePath, "*.formdocument").FirstOrDefault() : null;
 
                             var isActive = !String.IsNullOrWhiteSpace(file);
                             if (isActive != previouslyActive)