diff --git a/LittleBigMouse.Ui/LittleBigMouse.Ui.Avalonia/Persistency/PersistencyExtentions.cs b/LittleBigMouse.Ui/LittleBigMouse.Ui.Avalonia/Persistency/PersistencyExtentions.cs index d2f53b6e..e485dbcb 100644 --- a/LittleBigMouse.Ui/LittleBigMouse.Ui.Avalonia/Persistency/PersistencyExtentions.cs +++ b/LittleBigMouse.Ui/LittleBigMouse.Ui.Avalonia/Persistency/PersistencyExtentions.cs @@ -97,7 +97,6 @@ public static bool SaveEnabled(this IMonitorsLayout @this) if (@this.Options.LoadAtStartup) @this.Schedule(); else @this.Unschedule(); - //@this.Saved = true; return true; } @@ -324,7 +323,7 @@ public static void Load(this DisplaySource @this, RegistryKey key) @this.Orientation = orientation; - @this.DisplayName = key.GetOrSet($@"{id}\DisplayName", () => @this.DisplayName); + // @this.DisplayName = key.GetOrSet($@"{id}\DisplayName", () => @this.DisplayName); @this.Saved = true; } diff --git a/LittleBigMouse.Ui/LittleBigMouse.Ui.Avalonia/Plugins/Default/DefaultMonitorViewModel.cs b/LittleBigMouse.Ui/LittleBigMouse.Ui.Avalonia/Plugins/Default/DefaultMonitorViewModel.cs index d6666a0e..6d24d4ac 100644 --- a/LittleBigMouse.Ui/LittleBigMouse.Ui.Avalonia/Plugins/Default/DefaultMonitorViewModel.cs +++ b/LittleBigMouse.Ui/LittleBigMouse.Ui.Avalonia/Plugins/Default/DefaultMonitorViewModel.cs @@ -51,19 +51,13 @@ public DefaultMonitorViewModel() (attached, primary) => attached && !primary) .ToProperty(this, e => e.DetachVisible); - DetachCommand = ReactiveCommand.Create(() => - { - DetachFromDesktop(); - },this.WhenAnyValue( + DetachCommand = ReactiveCommand.Create(DetachFromDesktop,this.WhenAnyValue( e => e.Attached, e => e.Primary, (attached,primary) => attached && !primary) .ObserveOn(RxApp.MainThreadScheduler)); - AttachCommand = ReactiveCommand.Create(() => - { - AttachToDesktop(); - },this.WhenAnyValue(e => e.Attached, e => !e).ObserveOn(RxApp.MainThreadScheduler)); + AttachCommand = ReactiveCommand.Create(AttachToDesktop,this.WhenAnyValue(e => e.Attached, e => !e).ObserveOn(RxApp.MainThreadScheduler)); } public bool Attached => _attached.Value;