Skip to content

Commit

Permalink
Fixed plugin count on the old interface (#96168)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulopmt1 authored Nov 7, 2024
1 parent c3ed7e2 commit 479fd79
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/my-sites/plugins/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { subscribeIsWithinBreakpoint, isWithinBreakpoint } from '@automattic/vie
import { Icon, upload } from '@wordpress/icons';
import clsx from 'clsx';
import { localize } from 'i18n-calypso';
import { filter as lodashFilter, capitalize, flow, isEmpty } from 'lodash';
import { filter as capitalize, flow, isEmpty } from 'lodash';
import { Component } from 'react';
import { connect } from 'react-redux';
import DocumentHead from 'calypso/components/data/document-head';
Expand Down Expand Up @@ -424,7 +424,7 @@ export class PluginsMain extends Component {
header={ this.props.translate( 'Manage Plugins' ) }
plugins={ currentPlugins }
isPlaceholder={ this.shouldShowPluginListPlaceholders() }
isLoading={ this.props.requestingPluginsForSites || this.props.isLoadingSites }
isLoading={ this.props.requestingPluginsForSites }
isJetpackCloud={ this.props.isJetpackCloud }
searchTerm={ search }
filter={ this.props.filter }
Expand Down Expand Up @@ -624,7 +624,6 @@ export default flow(
const siteIds = siteObjectsToSiteIds( sites ) ?? [];
const isLoadingSites = isRequestingSites( state );
const allPlugins = getPlugins( state, siteIds, 'all' );
const pluginsWithUpdates = lodashFilter( allPlugins, 'updates' );
const pluginsWithUpdatesAndStatuses = getPluginsWithUpdateStatuses( state, allPlugins );

const jetpackNonAtomic =
Expand Down Expand Up @@ -659,8 +658,6 @@ export default flow(
currentPluginsOnVisibleSites: newBulkPluginManagement
? []
: getPlugins( state, siteObjectsToSiteIds( getVisibleSites( sites ) ) ?? [], filter ),
pluginsWithUpdates,
pluginUpdateCount: pluginsWithUpdates && pluginsWithUpdates.length,
allPluginsCount: allPlugins && allPlugins.length,
requestingPluginsForSites:
isRequestingForSites( state, siteIds ) || isRequestingForAllSites( state ),
Expand All @@ -675,6 +672,9 @@ export default flow(
breadcrumbs,
requestPluginsError: requestPluginsError( state ),
newBulkPluginManagement,
pluginUpdateCount: newBulkPluginManagement
? 0
: getPlugins( state, siteIds, 'updates' )?.length,
};
},
{
Expand Down

0 comments on commit 479fd79

Please sign in to comment.