From aeb068259cd18b3366aefd507736832c778f016e Mon Sep 17 00:00:00 2001 From: spsiddarthan Date: Mon, 21 Oct 2024 14:04:18 +0530 Subject: [PATCH] Social: Fix broken calypso sharing experience when toggling off connections. --- client/blocks/post-share/connection.jsx | 7 +++---- client/blocks/post-share/connections-list.jsx | 2 +- client/blocks/post-share/index.jsx | 12 ++++++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/client/blocks/post-share/connection.jsx b/client/blocks/post-share/connection.jsx index d9ab9ad63e9ed8..67de3f229b81f5 100644 --- a/client/blocks/post-share/connection.jsx +++ b/client/blocks/post-share/connection.jsx @@ -20,10 +20,9 @@ function hasRoundIcon( service ) { } const PostShareConnection = ( { connection, isActive, onToggle } ) => { - const { external_display, external_profile_picture, keyring_connection_ID, service, status } = - connection; + const { external_display, external_profile_picture, ID, service, status } = connection; - const toggle = () => onToggle( keyring_connection_ID ); + const toggle = () => onToggle( ID ); const classes = clsx( { 'post-share__service': true, @@ -32,7 +31,7 @@ const PostShareConnection = ( { connection, isActive, onToggle } ) => { 'is-broken': status === 'broken', } ); - const id = `post-share__label-${ keyring_connection_ID }`; + const id = `post-share__label-${ ID }`; const accountImageStyle = {}; if ( external_profile_picture ) { diff --git a/client/blocks/post-share/connections-list.jsx b/client/blocks/post-share/connections-list.jsx index 9769f767744863..469a028058f7a1 100644 --- a/client/blocks/post-share/connections-list.jsx +++ b/client/blocks/post-share/connections-list.jsx @@ -38,7 +38,7 @@ class ConnectionsList extends PureComponent {
{ connections.map( ( connection ) => ( @@ -173,7 +173,7 @@ class PostShare extends Component { sharePost = () => { const { postId, siteId, connections, isJetpack } = this.props; const servicesToPublish = connections.filter( - ( connection ) => this.state.skipped.indexOf( connection.keyring_connection_ID ) === -1 + ( connection ) => this.state.skipped.indexOf( connection.ID ) === -1 ); //Let's prepare array of service stats for tracks. const numberOfAccountsPerService = servicesToPublish.reduce( @@ -376,7 +376,7 @@ class PostShare extends Component {
{ brokenConnections.map( ( connection ) => ( (