Skip to content

Commit d417036

Browse files
committed
Fixed profiles getting edited after loading
1 parent 095232f commit d417036

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/view/screens/overlay.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ class HDSOverlay extends StatelessWidget {
180180
Hive.box<DataWidgetProperties>(HiveUtils.boxDataWidgetProperties);
181181

182182
await box.clear();
183-
await box.addAll(profile.widgetProperties);
183+
// We have to copy the objects or they get edited unintentionally
184+
await box.addAll(
185+
profile.widgetProperties.map((e) => DataWidgetProperties.copy(e)));
184186

185187
connectionController.logs
186188
.add(LogMessage(LogLevel.good, 'Profile loaded: ${profile.name}'));

0 commit comments

Comments
 (0)