From 2e80c039d812ce58d841ab92ca8b6c44f61db14d Mon Sep 17 00:00:00 2001 From: Nanthini Mahalingam Date: Mon, 18 Nov 2024 12:34:03 +0530 Subject: [PATCH] Removed the unwanted code section --- .../Shell/iOS/ShellPageRendererTracker.cs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs index ba05408ee021..eff94bfb0f47 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs @@ -400,17 +400,14 @@ void UpdateBackButtonTitle() var previousNavItem = viewControllers[count - 2].NavigationItem; if (previousNavItem != null) { - if (previousNavItem.BackBarButtonItem is null) + if (text is not null) { - if (text is not null) - { - var barButtonItem = (previousNavItem.BackBarButtonItem ??= new UIBarButtonItem()); - barButtonItem.Title = text; - } - else if (previousNavItem.BackBarButtonItem != null) - { - previousNavItem.BackBarButtonItem = null; - } + var barButtonItem = (previousNavItem.BackBarButtonItem ??= new UIBarButtonItem()); + barButtonItem.Title = text; + } + else if (previousNavItem.BackBarButtonItem != null) + { + previousNavItem.BackBarButtonItem = null; } } }