@lvce-editor/source-control-worker 2.18.0 → 2.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1732,6 +1732,7 @@ const loadContent = async (state, savedState) => {
1732
1732
 
1733
1733
  // TODO make preferences async and more functional
1734
1734
  const splitButtonEnabled = await get$1('sourceControl.splitButtonEnabled');
1735
+ const badgeCount = allGroups.reduce((sum, group) => sum + group.items.length, 0);
1735
1736
  const total = displayItems.length;
1736
1737
  const contentHeight = total * itemHeight;
1737
1738
  const listHeight = getListHeight(total, itemHeight, height);
@@ -1748,6 +1749,7 @@ const loadContent = async (state, savedState) => {
1748
1749
  ...state,
1749
1750
  actionsCache,
1750
1751
  allGroups,
1752
+ badgeCount,
1751
1753
  decorationIcons: iconDefinitions,
1752
1754
  enabledProviderIds,
1753
1755
  fileIconCache: newFileIconCache,
@@ -2010,6 +2012,7 @@ const refresh = async state => {
2010
2012
  } = await getGroups(enabledProviderIds);
2011
2013
  const expandedGroups = restoreExpandedGroups(allGroups);
2012
2014
  const displayItems = getDisplayItems(allGroups, expandedGroups, iconDefinitions);
2015
+ const badgeCount = allGroups.reduce((sum, group) => sum + group.items.length, 0);
2013
2016
  const total = displayItems.length;
2014
2017
  const contentHeight = total * itemHeight;
2015
2018
  const listHeight = getListHeight(total, itemHeight, height);
@@ -2024,6 +2027,7 @@ const refresh = async state => {
2024
2027
  ...state,
2025
2028
  actionsCache,
2026
2029
  allGroups,
2030
+ badgeCount,
2027
2031
  enabledProviderIds,
2028
2032
  fileIconCache: newFileIconCache,
2029
2033
  finalDeltaY,
@@ -2125,6 +2129,7 @@ const updateVisibleItems = async (state, expandedGroups) => {
2125
2129
  itemHeight
2126
2130
  } = state;
2127
2131
  const displayItems = getDisplayItems(allGroups, expandedGroups, iconDefinitions);
2132
+ const badgeCount = allGroups.reduce((sum, group) => sum + group.items.length, 0);
2128
2133
  const total = displayItems.length;
2129
2134
  const listHeight = getListHeight(total, itemHeight, height);
2130
2135
  const numberOfVisible = getNumberOfVisibleItems(listHeight, itemHeight);
@@ -2133,6 +2138,7 @@ const updateVisibleItems = async (state, expandedGroups) => {
2133
2138
  const visibleItems = getVisibleSourceControlItems(displayItems, minLineY, maxLineY, actionsCache, fileIconCache);
2134
2139
  return {
2135
2140
  ...state,
2141
+ badgeCount,
2136
2142
  expandedGroups,
2137
2143
  items: displayItems,
2138
2144
  maxLineY,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/source-control-worker",
3
- "version": "2.18.0",
3
+ "version": "2.19.0",
4
4
  "description": "Source Control Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"