Skip to content

Commit

Permalink
Update diff_pane_controller.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c committed Apr 27, 2024
1 parent 983fa7b commit 7fb2681
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,19 @@ class DiffPaneController extends DisposableController {
final snapshots = (json[_Json.snapshots] as List)
.map((e) => SnapshotDataItem.fromJson(e))
.toList();

final diffWith = json[_Json.diffWith] as List<int?>;

for (var i = 0; i < snapshots.length; i++) {
final diffIndex = diffWith[i];
if (diffIndex != null) {
snapshots[i].diffWith.value = snapshots[diffIndex];
}
}

return DiffPaneController(
loader: null,
//snapshots: snapshots,
snapshots: snapshots,
);
}

Expand Down

0 comments on commit 7fb2681

Please sign in to comment.