UnigramDev/Unigram/develop • fc20910 • 2 files, +18/-3 Stop the gallery ad taking clicks while it fa

Telegram github commits and releases

Telegram github commits and releases

@tgappsupdates

Broadcast from the most important Telegram clients' repositories

4,538 מנויים
פתח בטלגרם
UnigramDev/Unigram/developfc209102 files, +18/-3
Stop the gallery ad taking clicks while it fades out

ShowHide(false) sets _collapsed immediately but only applies Visibility from the
scoped batch's Completed, so the button stays visible and hit-testable for the
whole fade - after the state its click handler needs is gone. Swiping to another
gallery item runs Dispose(), which reaches UpdateAdvertisement(null) and clears
_advertisement, and closing additionally drops the data context, so a click in
that window crashed on _advertisement.UniqueId (NullReferenceException, reported
by crash telemetry on 12.9.1).

The button now stops taking input when hiding starts rather than when the fade
ends, and the handler is guarded as well, because a focused button can still be
invoked from the keyboard or by automation, neither of which hit tests.

Also fix Unload() dropping the delegate before calling PlaybackStopped(), which
left UpdateAdvertisement(null) with nothing to call and the control holding a
stale advertisement.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

#unigram
פתח את הפוסט בטלגרם