@@ -629,7 +629,7 @@ + (void)updateViewController:(UIViewController *)vc
629629 action: nil ];
630630 [backBarButtonItem setMenuHidden: config.disableBackButtonMenu];
631631
632- auto isBackButtonCustomized = !isBackTitleBlank || config.disableBackButtonMenu ;
632+ auto shouldUseCustomBackBarButtonItem = !isBackTitleBlank || config.disableBackButtonMenu ;
633633
634634#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_14_0) && \
635635 __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0
@@ -646,7 +646,7 @@ + (void)updateViewController:(UIViewController *)vc
646646 // See: https://github.com/software-mansion/react-native-screens/pull/2105#discussion_r1565222738
647647 ![config.backTitleFontFamily isEqual: @" System" ]) ||
648648 config.backTitleFontSize ) {
649- isBackButtonCustomized = YES ;
649+ shouldUseCustomBackBarButtonItem = YES ;
650650 NSMutableDictionary *attrs = [NSMutableDictionary new ];
651651 NSNumber *size = config.backTitleFontSize ?: @17 ;
652652 if (config.backTitleFontFamily ) {
@@ -669,15 +669,15 @@ + (void)updateViewController:(UIViewController *)vc
669669 // When backBarButtonItem's title is null, back menu will use value
670670 // of backButtonTitle
671671 [backBarButtonItem setTitle: nil ];
672- isBackButtonCustomized = YES ;
672+ shouldUseCustomBackBarButtonItem = YES ;
673673 prevItem.backButtonTitle = resolvedBackTitle;
674674 }
675675
676676 // Prevent unnecessary assignment of backBarButtonItem if it is not customized,
677677 // as assigning one will override the native behavior of automatically shortening
678678 // the title to "Back" or hide the back title if there's not enough space.
679679 // See: https://github.com/software-mansion/react-native-screens/issues/1589
680- if (isBackButtonCustomized ) {
680+ if (shouldUseCustomBackBarButtonItem ) {
681681 prevItem.backBarButtonItem = backBarButtonItem;
682682 }
683683
0 commit comments