Commit 7d99b368 authored by Ted Choc's avatar Ted Choc Committed by Commit Bot

Fix tab count flicker on startup.

When the tabs are being initialized on startup, we should suppress
broadcasting the tab count when it is rapidly changing to avoid the
number flickering in the toolbar.

This was the previous logic, but regressed when we introduced
the TabCountProvider.

BUG=

Change-Id: I6b3ed6724ca1a5e78df2e2dddee2e693d65de4ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1715571
Commit-Queue: Ted Choc <tedchoc@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680157}
parent 4c1813b4
......@@ -203,6 +203,8 @@ public class TabCountProvider {
}
private void updateTabCount() {
if (!mTabModelSelector.isTabStateInitialized()) return;
final int tabCount =
mTabModelSelector.getTabModelFilterProvider().getCurrentTabModelFilter().getCount();
final boolean isIncognito = mTabModelSelector.isIncognitoSelected();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment