UnigramDev/Unigram/tdlib-list-t • 4cbb362 • 1 files, +23/-1 Follow x:Bind into the setters the XAML

Telegram github commits and releases

Telegram github commits and releases

@tgappsupdates

Broadcast from the most important Telegram clients' repositories

4 538 підписників
Відкрити в Telegram
UnigramDev/Unigram/tdlib-list-t4cbb3621 files, +23/-1
Follow x:Bind into the setters the XAML compiler emits

A binding does not assign the property: it calls a Set_ on XamlBindingSetters,
which takes the value as object and belongs to this assembly, so nothing
flagged it. Following that one call reports 83 collections bound from XAML
with no CCW vtable - each one a page that throws when opened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

UnigramDev/Unigram/tdlib-list-t099bab682 files, +337/-313
Take List<T> in the generated constructors too

The parameter and the field are the same type now, so TdCollection.AsList is
gone. Call sites became [x] and [], which allocates less than it did: the
converter copied every array into a list.

Four needed more than a rewrite. TryGetColors and the two chat-list readers
fill by Add rather than by index, because a List's capacity is not its count.
TextStyleRun shares one empty list, since Array.Empty was free and these sit
on the render path - a shared mutable list is a footgun, and notes has the
plan for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

#unigram
Відкрити пост в Telegram