diff --git a/lib/src/models/view/builders/settings_builder.dart b/lib/src/models/view/builders/settings_builder.dart index 8de58f8cd..a879040b0 100644 --- a/lib/src/models/view/builders/settings_builder.dart +++ b/lib/src/models/view/builders/settings_builder.dart @@ -1,3 +1,4 @@ +import "package:collection/collection.dart"; import "package:flutter/material.dart"; import "package:rover_dashboard/data.dart"; import "package:rover_dashboard/models.dart"; @@ -377,8 +378,14 @@ class SettingsBuilder extends ValueBuilder { // Need an if to avoid resetting throttle when trying to set throttle models.rover.setDefaultControls(); } + final resetSockets = !(const DeepCollectionEquality().equals( + models.settings.network.toJson(), + value.network.toJson(), + )); await models.settings.update(value); - await models.sockets.reset(); + if (resetSockets) { + await models.sockets.reset(); + } models.video.reset(); isLoading = false; notifyListeners();