From 2b44936e455c226ef953d3959e521aebe2e5f9f0 Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Wed, 20 Nov 2019 23:25:24 +0300 Subject: [PATCH] [vcs-log] send validate request on data pack arrival for visible log tabs When a log tab becomes visible, it needs to be validated. If refresh for some roots was postponed, it should be performed prior to validation so that the tab would use the newest data pack. Previously, tab was not validated when there were postponed roots, which led to it being stuck in the previous state and in need of manual refresh (could be a possible cause of EA-84824). In most cases, refresh is done in background and no roots are postponed, so the issue did not happen, unless "vcs.log.keep.up.to.date" was disabled or the IDE was in power save mode. In this commit, validation is added on data pack arrival for all visible tabs. GitOrigin-RevId: bfae995510018d1553e71e5e7ad0a05c2b86baad --- .../com/intellij/vcs/log/impl/PostponableLogRefresher.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/impl/PostponableLogRefresher.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/impl/PostponableLogRefresher.java index 40d338425269..beb6f1cce7de 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/impl/PostponableLogRefresher.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/impl/PostponableLogRefresher.java @@ -75,12 +75,7 @@ public class PostponableLogRefresher implements VcsLogRefresher { } private static void dataPackArrived(@NotNull VisiblePackRefresher refresher, boolean visible) { - if (!visible) { - refresher.setValid(false, true); - } - else { - refresher.onRefresh(); - } + refresher.setValid(visible, true); } @Override