TGViewer
Telegram github commits and releases Telegram github commits and releases @tgappsupdates · 4.54K subscribers
Post #20646 55
UnigramDev/Unigram/develop • 3503a0d • 1 files, +11/-2
Register the theme before reading its settings (#3343)

Theme.Current is thread-static and assigned in exactly one place, and that
assignment sat behind a call that can fail:

try
{
_isolatedStore = ApplicationData.Current.LocalSettings.CreateContainer(...);
Current ??= this;
...
}
catch { }

When CreateContainer throws, the catch is silent and the theme never registers
itself. Every later Theme.Current dereference - and they are unguarded across
the message tree, FormattedTextBlock, MessageBubblePanel, ChatBackgroundControl
- is then a NullReferenceException on that view thread.

Reported by crash telemetry on 12.9.1, through OnShareTargetActivated:
SharePage's constructor calls ChatBackgroundControl.Update, which reads
Theme.Current.ChatBackground and dies. The share target view is driven before
it is initialized - the same race as #3320, which moved this crash one frame
later rather than removing it - and ApplicationData is evidently not always
reachable that early.

That the constructor ran at all is not in doubt: SharePage.xaml resolves
StaticResource EmptyHyperlinkButtonStyle from CommonStyles.xaml, a merged
dictionary of Application.Resources that follows <common:Theme /> in the merge
list, so InitializeComponent could not have returned unless the resources of
this view - the theme among them - had been inflated.

Assign Current before the try. It depends on nothing inside it, and losing a
persisted preference should not cost the view its theme. The catch now logs,
since the whole diagnosis rests on inferring which call threw, and an empty
catch is what made that necessary.

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

UnigramDev/Unigram/develop • 3409687 • 1 files, +12/-1
Guard the geolocation access request in SendLocationPopup (#3344)

Geolocator.RequestAccessAsync is a remote procedure call and throws when the
Windows Geolocation Service (lfsvc) is disabled, which privacy/debloat scripts
routinely do. In FindLocation the call was the only one not wrapped, so the
throw escaped an async void method and reached the unhandled exception handler.

Treat a failed request as "not allowed": the popup keeps the map shimmer, the
same as an explicit denial.

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

UnigramDev/Unigram/develop • 5316a20 • 1 files, +19/-8
Fix the Topics tab context menu casting to the wrong item type (#3345)

ProfileTopicsTabPage.OnContextRequested was an unadapted copy of the one in
ProfileSavedChatsTabPage: it cast the right-clicked item to SavedMessagesTopic,
which is always null here because this list holds ForumTopic, and it invoked
the saved chats tab's commands instead of the topics tab's own. Right-clicking
any row threw a NullReferenceException, reported by crash telemetry on 12.9.1.

Cast to ForumTopic, route pin/delete to TopicsTab, and gate them on
CanManageTopics the way ForumView's own topic menu does.

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

#unigram
  • 👍 1
More from @tgappsupdates
  1. Oct 12, 2026TGX-Android/Telegram-X/main • a7ce680 • 2 files, +14/-3 Fix answering call from background…
  2. Oct 12, 2026TGX-Android/Telegram-X/main • 8d2d958 • 2 files, +9/-2 Fix answering call from background…
  3. Oct 12, 2026TGX-Android/Telegram-X/main • f4bdd29 • 1 files, +10/-3 Fix passing `aapt2` arguments #tgx…
  4. Oct 12, 2026TGX-Android/Telegram-X/main • 4e2dd7e • 1 files, +1/-1 Reduce APK size #tgxandroid
  5. Oct 12, 2026TGX-Android/Telegram-X/main • fd1f52d • 5 files, +16/-16 Remove rudimentary `this` referen…
  6. Oct 12, 2026TGX-Android/Telegram-X/main • 1128e91 • 3 files, +69/-0 Optimize APK size for `latest` fla…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →