From 36b4a8e6c2b38733eba10c9c1cb33f8c545e4fb7 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 15 May 2017 11:11:28 +0100 Subject: [PATCH] Update ranges tracker. --- .../coffee/ide/review-panel/RangesTracker.coffee | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/services/web/public/coffee/ide/review-panel/RangesTracker.coffee b/services/web/public/coffee/ide/review-panel/RangesTracker.coffee index 4174dcdab0..869d63159b 100644 --- a/services/web/public/coffee/ide/review-panel/RangesTracker.coffee +++ b/services/web/public/coffee/ide/review-panel/RangesTracker.coffee @@ -96,6 +96,20 @@ load = () -> break return change + getChanges: (change_ids) -> + changes_response = [] + ids_map = {} + + for change_id in change_ids + ids_map[change_id] = true + + for change in @changes + if ids_map[change.id] + delete ids_map[change.id] + changes_response.push change + + return changes_response + removeChangeId: (change_id) -> change = @getChange(change_id) return if !change?