GeezerVison is showing github.com — fix(mobile): compose button no longer covers the last tab on iPhone (… · adampeterhiggins/t3code@c7c2bcc
File tree
Expand file treeCollapse file tree
Open diff view settings
apps/mobile/modules/t3-native-controls/ios
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,11 @@ private final class WorkspaceTabBar: UITabBar { |
11 | 11 | let candidates = identified.isEmpty ? tabButtons(in: self) { _ in true } : identified |
12 | 12 | // Pressing a tab adds a magnified copy of the row for the glass lens, without identifiers. |
13 | 13 | // Sizing compose from it leaves compose enlarged until the bar lays out again. |
14 | | - let buttons = candidates.filter { convert($0.bounds, from: $0).size == $0.bounds.size } |
| 14 | + // The copy is many points larger; the tolerance only absorbs conversion rounding. |
| 15 | + let buttons = candidates.filter { |
| 16 | + let size = convert($0.bounds, from: $0).size |
| 17 | + return abs(size.width - $0.bounds.width) < 1 && abs(size.height - $0.bounds.height) < 1 |
| 18 | + } |
15 | 19 | let row = buttons.reduce(CGRect.null) { $0.union(convert($1.bounds, from: $1)) } |
16 | 20 | if !row.isNull { onContentLayout?(row) } |
17 | 21 | } |
|