diff --git a/DiscordChatExporter.Gui/App.axaml.cs b/DiscordChatExporter.Gui/App.axaml.cs index b933efba..c9a5d911 100644 --- a/DiscordChatExporter.Gui/App.axaml.cs +++ b/DiscordChatExporter.Gui/App.axaml.cs @@ -65,8 +65,7 @@ public class App : Application, IDisposable }; InitializeTheme(); - }, - false + } ) ); } diff --git a/DiscordChatExporter.Gui/Utils/Extensions/NotifyPropertyChangedExtensions.cs b/DiscordChatExporter.Gui/Utils/Extensions/NotifyPropertyChangedExtensions.cs index 2f9744fc..511added 100644 --- a/DiscordChatExporter.Gui/Utils/Extensions/NotifyPropertyChangedExtensions.cs +++ b/DiscordChatExporter.Gui/Utils/Extensions/NotifyPropertyChangedExtensions.cs @@ -11,15 +11,11 @@ internal static class NotifyPropertyChangedExtensions this TOwner owner, Expression> propertyExpression, Action callback, - bool watchInitialValue = true + bool watchInitialValue = false ) where TOwner : INotifyPropertyChanged { - var memberExpression = - propertyExpression.Body as MemberExpression - // Property value might be boxed inside a conversion expression, if the types don't match - ?? (propertyExpression.Body as UnaryExpression)?.Operand as MemberExpression; - + var memberExpression = propertyExpression.Body as MemberExpression; if (memberExpression?.Member is not PropertyInfo property) throw new ArgumentException("Provided expression must reference a property."); @@ -45,7 +41,7 @@ internal static class NotifyPropertyChangedExtensions public static IDisposable WatchAllProperties( this TOwner owner, Action callback, - bool watchInitialValues = true + bool watchInitialValues = false ) where TOwner : INotifyPropertyChanged {