From afb1f40841306ffb30c76d35d2bfde65d48bb016 Mon Sep 17 00:00:00 2001 From: Boro Sitnikovski Date: Fri, 6 Dec 2024 14:07:22 +0100 Subject: [PATCH] Invert the option on the UI for easier understanding (#97146) * Invert the option on the UI for easier understanding * Update client/me/notification-settings/reader-subscriptions/index.jsx Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com> --------- Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com> --- .../reader-subscriptions/index.jsx | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/client/me/notification-settings/reader-subscriptions/index.jsx b/client/me/notification-settings/reader-subscriptions/index.jsx index 61aa20d0ef29c..9d1e4cd9bb17c 100644 --- a/client/me/notification-settings/reader-subscriptions/index.jsx +++ b/client/me/notification-settings/reader-subscriptions/index.jsx @@ -34,12 +34,10 @@ class NotificationSubscriptions extends Component { return () => this.props.recordGoogleEvent( 'Me', 'Focused on ' + action ); } - handleCheckboxEvent( action ) { + handleCheckboxEvent( action, invert = false ) { return ( event ) => { - const eventAction = 'Clicked ' + action + ' checkbox'; - const optionValue = event.target.checked ? 1 : 0; - - this.props.recordGoogleEvent( 'Me', eventAction, 'checked', optionValue ); + const optionValue = invert ? ! event.target.checked : event.target.checked; + this.props.recordGoogleEvent( 'Me', `Clicked ${ action } checkbox`, 'checked', +optionValue ); }; } @@ -243,21 +241,21 @@ class NotificationSubscriptions extends Component { { isAutomattician && ( - - Disable auto-follow P2 posts upon commenting (Automatticians only) - + Auto-follow P2 posts (Automatticians only) - Don't automatically subscribe to notifications for a P2 post whenever you leave - a comment on it. + Automatically subscribe to P2 post notifications when you leave a comment.