Skip to content

Fix black screen when per-chat wallpaper fails to download - #1370

Open
GeiserX wants to merge 1 commit into
overtake:masterfrom
GeiserX:fix/loading-wallpaper-black-screen
Open

Fix black screen when per-chat wallpaper fails to download#1370
GeiserX wants to merge 1 commit into
overtake:masterfrom
GeiserX:fix/loading-wallpaper-black-screen

Conversation

@GeiserX

@GeiserX GeiserX commented Apr 23, 2026

Copy link
Copy Markdown

Summary

  • When a channel has a custom wallpaper that isn't cached locally, themeWallpaper emits .loading followed by moveWallpaperToCache. If the wallpaper resource never fully downloads, moveWallpaperToCache returns .complete() without emitting a value (CoreExtension.swift:2845), so .result(...) is never delivered.
  • The .loading case in the presentation update handler (ChatController.swift:3270) was a no-op (break), meaning the presentation theme was never applied.
  • Since the TableView background is .clear and no BackgroundView overlay was created without a theme, the chat rendered as a completely black/blank screen.

Fix

Apply the base theme with emoticon themes during .loading (same call as the .result path at line 3257), so there is always a visible background while the wallpaper is being fetched. Once the wallpaper finishes downloading, the .result case fires and applies the wallpaper on top — no change in behavior for the happy path.

Reproduction

  1. Open a channel that has a custom wallpaper set by admin
  2. The wallpaper file fails to download or takes too long
  3. Message area renders completely black — no messages visible
  4. Web client and iOS work fine for the same channel

Fixes #1369

When a channel has a custom wallpaper that isn't cached locally,
themeWallpaper emits .loading, then moveWallpaperToCache may complete
without emitting a value if the resource never fully downloads.

The .loading case in the presentation update handler was a no-op
(break), which meant the presentation theme was never set. Since
the TableView background is .clear and no BackgroundView overlay
was created, the chat rendered as a completely black/blank screen.

Apply the base theme during .loading so there is always a visible
background while the wallpaper is being fetched.

Fixes overtake#1369
@CLAassistant

CLAassistant commented Apr 23, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@GeiserX

GeiserX commented Apr 23, 2026

Copy link
Copy Markdown
Author

Fix verified ✅

Built the patched client locally (Debug, Xcode 26) and confirmed the fix resolves the issue. The channel that was rendering a completely black message area now displays correctly.

Before: Blank/black message area (see issue screenshot)
After: Messages render properly (blurred for privacy) - in next comment

The one-line change — applying the base theme presentation during the .loading wallpaper state instead of break — ensures the chat always has a valid presentation theme while the custom wallpaper downloads.

@GeiserX

GeiserX commented Apr 23, 2026

Copy link
Copy Markdown
Author
telegram_fix_verified_blurred The fix worked, showing it here for demonstration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants