also looking at this
fix(native): retain keyed controls and correct map and tab chrome
#368
32 files
+449
-100
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -783,6 +783,10 @@ final class CraftChrome: ObservableObject { | ||
| 783 | 783 | } else { |
| 784 | 784 | next = nil |
| 785 | 785 | } |
| 786 | #if DEBUG | |
| 787 | NSLog("[craft chrome trace] accessory present=%d owner=%@", next != nil ? 1 : 0, | |
| 788 | owner.map { String(describing: ObjectIdentifier($0)) } ?? "none") | |
| 789 | #endif | |
| 786 | 790 | tabAccessoryOwner = owner |
| 787 | 791 | guard tabAccessory != next else { return } |
| 788 | 792 | tabAccessory = next |
| @@ -4675,6 +4675,12 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate, | ||
| 4675 | 4675 | |
| 4676 | 4676 | private func restoreShellChrome() { |
| 4677 | 4677 | guard !isAppScript else { return } |
| 4678 | #if DEBUG | |
| 4679 | NSLog("[craft chrome trace] restore route=%@ controller=%@ top=%d hidden=%d accessory=%d", | |
| 4680 | routeName ?? "none", String(describing: ObjectIdentifier(self)), | |
| 4681 | navigationController?.topViewController === self ? 1 : 0, | |
| 4682 | navigationController?.view.isHidden == true ? 1 : 0, tabAccessory != nil ? 1 : 0) | |
| 4683 | #endif | |
| 4678 | 4684 | CraftChrome.shared.setHiddenByScreen(tabBarHidden) |
| 4679 | 4685 | CraftChrome.shared.updateTabAccessory(tabAccessory, owner: self) |
| 4680 | 4686 | } |
| @@ -5346,6 +5352,11 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate, | ||
| 5346 | 5352 | guard !isAppScript else { return } |
| 5347 | 5353 | if options.keys.contains("tabAccessory") { |
| 5348 | 5354 | tabAccessory = options["tabAccessory"] as? [String: Any] |
| 5355 | #if DEBUG | |
| 5356 | NSLog("[craft chrome trace] options route=%@ controller=%@ accessory=%d top=%d window=%d", | |
| 5357 | routeName ?? "none", String(describing: ObjectIdentifier(self)), tabAccessory != nil ? 1 : 0, | |
| 5358 | navigationController?.topViewController === self ? 1 : 0, view.window != nil ? 1 : 0) | |
| 5359 | #endif | |
| 5349 | 5360 | if navigationController?.topViewController === self, view.window != nil { |
| 5350 | 5361 | CraftChrome.shared.updateTabAccessory(tabAccessory, owner: self) |
| 5351 | 5362 | } |