Hi,
I found 2 bugs in Diff.checkViews().
When I change a view and do a diff, it notices the change, but it tries to drop the view and then add the same view back instead of adding the new view.
To fix it, you need to delete the entire else block in the first for loop:
- } else {
View targetView = null;
for (View view : targetSnapshot.getViews()) {
if (view.getName().equals(baseView.getName())) {
if (!view.getDefinition().equals(
baseView.getDefinition())) {
diffResult.addChangedView(view);
}
}
}
}
Also, in the 2nd for loop, you have this line inside the else block:
- for (View view : targetSnapshot.getViews()) {
- for (View view : referenceSnapshot.getViews()) {