refactor: migrate models to freezed + json_serializable

This commit is contained in:
edde746
2026-05-11 12:54:26 +02:00
parent 2bbd31d927
commit d0bd919ff4
59 changed files with 9551 additions and 1236 deletions
@@ -544,7 +544,7 @@ class WatchTogetherProvider with ChangeNotifier {
if (message.peerId != null && message.position != null) {
final index = _participants.indexWhere((p) => p.peerId == message.peerId);
if (index >= 0) {
_participants[index] = _participants[index].copyWith(lastKnownPosition: message.position);
_participants[index] = _participants[index].copyWith(lastKnownPosition: message.position!);
// Don't notify for position updates - too frequent
}
}
@@ -606,7 +606,7 @@ class WatchTogetherProvider with ChangeNotifier {
if (message.controlMode != null) {
appLogger.d('WatchTogether: Received session config, controlMode: ${message.controlMode}');
_session = _session!.copyWith(controlMode: message.controlMode);
_session = _session!.copyWith(controlMode: message.controlMode!);
_syncManager?.updateSession(_session!); // Update sync manager if it exists
notifyListeners();
}