Skip to content

Commit

Permalink
🐛 UI: Overwrite pending device informations instead of trying to add …
Browse files Browse the repository at this point in the history
…them.
  • Loading branch information
hexawyz committed Jul 28, 2024
1 parent a025cbd commit 68d64fd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Exo.Settings.Ui/ViewModels/CoolingViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private async Task WatchDevicesAsync(CancellationToken cancellationToken)
}
else if (!_devicesViewModel.IsRemovedId(info.DeviceId))
{
_pendingDeviceInformations.Add(info.DeviceId, info);
_pendingDeviceInformations[info.DeviceId] = info;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Exo.Settings.Ui/ViewModels/DevicesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ private async Task WatchDpiChangesAsync(CancellationToken cancellationToken)
}
else
{
_pendingDpiChanges.Add(notification.DeviceId, new(notification.Dpi));
_pendingDpiChanges[notification.DeviceId] = new(notification.Dpi);
}
}
}
Expand Down Expand Up @@ -350,7 +350,7 @@ private async Task WatchMonitorSettingChangesAsync(CancellationToken cancellatio
{
if (!_pendingMonitorSettingChanges.TryGetValue(notification.DeviceId, out var changes))
{
_pendingMonitorSettingChanges.Add(notification.DeviceId, changes = new());
_pendingMonitorSettingChanges[notification.DeviceId] = changes = [];
}
changes.Add(notification);
}
Expand Down
2 changes: 1 addition & 1 deletion Exo.Settings.Ui/ViewModels/LightingViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private async Task WatchDevicesAsync(CancellationToken cancellationToken)
}
else if (!_devicesViewModel.IsRemovedId(info.DeviceId))
{
_pendingDeviceInformations.Add(info.DeviceId, info);
_pendingDeviceInformations[info.DeviceId] = info;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Exo.Settings.Ui/ViewModels/SensorsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private async Task WatchDevicesAsync(CancellationToken cancellationToken)
}
else if (!_devicesViewModel.IsRemovedId(info.DeviceId))
{
_pendingDeviceInformations.Add(info.DeviceId, info);
_pendingDeviceInformations[info.DeviceId] = info;
}
}
}
Expand Down

0 comments on commit 68d64fd

Please sign in to comment.