mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
f224c104e0
* Fix the tab rail flickering on narrow iPad windows The rail is laid out beside the split view, so hiding it when the split collapsed handed that width back to the split, which then had room for its sidebar again, which showed the rail, which collapsed the split. Any window whose width sat within a rail of the split's collapse threshold flickered forever, an iPad mini in fullscreen among them. The split reports the same column visibility whether it collapsed on its own or because the sidebar was toggled, and at the same width, so the two can only be told apart by when they arrive: the rebound lands in the next layout pass. A collapse that soon after showing the rail is therefore taken as proof that the rail and the sidebar don't fit at this width, and the rail is left hidden until the window is resized. Later collapses are treated as deliberate and still hide the rail as before. The container width, the width the rail and the sidebar were shown not to fit at, and the moment the rail was last shown are one piece of state with invariants between them rather than three independent values, so keep them and the decision they feed together in TabRailVisibility.