Commit 2d0860665d2e1eb100b13fc280db9a453a2ccb69
Exists in
master
and in
1 other branch
Merge branch 'master' of git.ucsd.edu:110swag/flashy-frontend
Showing 1 changed file Side-by-side Diff
scripts/FeedController.js
View file @
2d08606
... | ... | @@ -133,7 +133,11 @@ |
133 | 133 | for (; i < column.length; i++) |
134 | 134 | if (column[i].score <= new_score) break; |
135 | 135 | card.score = new_score; |
136 | - column.splice(i, 0, column.splice(found, 1)[0]); | |
136 | + if ($scope.$$phase) { // most of the time it is "$digest" | |
137 | + column.splice(i, 0, column.splice(found, 1)[0]); | |
138 | + } else { | |
139 | + $scope.$apply(column.splice(i, 0, column.splice(found, 1)[0])); | |
140 | + } | |
137 | 141 | }; |
138 | 142 | |
139 | 143 | var loc = window.location, new_uri; |