UnigramDev/Unigram/settingsexpander-collapse-guard • ecf9d06 • 1 files, +3/-1
Fix the expander never collapsing its content
The scoped batch's Completed handler compares _tracker against a value captured
with a post-increment, so the comparison was (n + 1) == n and never held. The
handler is what applies Visibility.Collapsed after the collapse animation, and
PopupRoot.Visibility is set to Visible unconditionally just above it, so
collapsed content stayed visible and kept participating in layout — hidden only
by PopupHost.Height = 0 and the negative margin.
Pre-increment gives the guard its intended meaning: apply the final visibility
unless a newer toggle has started since this batch began.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
#unigram
Post #20544
108