Fix nav bar crash and empty settings screen after logout #2124
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The settings screen is empty after logout as it seen in the video. It may be related dynamic tab view count.
In that video the buggy one:
https://github.com/Dimillian/IceCubesApp/assets/78085814/c7b3c868-90ca-465e-9a84-32a895bc7fce
Here is the resolved one:
fixed.mp4
There was a weird crash sometimes related UINavigationBar such as
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Layout requested for visible navigation bar, <SwiftUI.UIKitNavigationBar: 0x109f91080; baseClass = UINavigationBar; frame = (0 24; 933.5 50); opaque = NO; autoresize = W; gestureRecognizers = <NSArray: 0x600000d7cea0>; layer = <CALayer: 0x6000005340a0>> delegate=0x135272800 standardAppearance=0x60000a62f180, when the top item belongs to a different navigation bar. topItem = <UINavigationItem: 0x12f5b3f10> title='@ozsayin' titleView=0x166b8b000 style=navigator leftItemsSupplementBackButton largeTitleDisplayMode=always, navigation bar = <SwiftUI.UIKitNavigationBar: 0x165ef79d0; baseClass = UINavigationBar; frame = (0 24; 533 50); opaque = NO; autoresize = W; userInteractionEnabled = NO; gestureRecognizers = <NSArray: 0x600000e1f060>; layer = <CALayer: 0x60000059acc0>> delegate=0x10acc9600 standardAppearance=0x60000a6cff00, possibly from a client attempt to nest wrapped navigation controllers.'
That is resolved too .