From f9bf9372dd308fb84f549e09e14e0461eeb37703 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 23 Apr 2026 13:14:56 +0200 Subject: [PATCH] Fix black screen when per-chat wallpaper fails to download 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/TelegramSwift#1369 --- Telegram-Mac/ChatController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram-Mac/ChatController.swift b/Telegram-Mac/ChatController.swift index 89698e84e9..8d1e1c1c5b 100644 --- a/Telegram-Mac/ChatController.swift +++ b/Telegram-Mac/ChatController.swift @@ -3268,7 +3268,7 @@ class ChatController: EditableViewController, Notifable, Tab } } case .loading: - break + current.presentation = theme.withUpdatedEmoticonThemes(emoticonThemes) } return current }