[chat] Migrate theme choose support.

This commit is contained in:
John Preston
2026-04-28 14:09:14 +07:00
parent c6673f73ba
commit 438fcd0fc6
4 changed files with 288 additions and 37 deletions

View File

@@ -1363,7 +1363,9 @@ void MainWidget::clearChooseReportMessages() {
void MainWidget::toggleChooseChatTheme(
not_null<PeerData*> peer,
std::optional<bool> show) {
_history->toggleChooseChatTheme(peer, show);
if (!_mainSection || !_mainSection->toggleChooseChatTheme(peer, show)) {
_history->toggleChooseChatTheme(peer, show);
}
}
bool MainWidget::showHistoryInDifferentWindow(
@@ -1713,6 +1715,11 @@ PeerData *MainWidget::peer() const {
}
Ui::ChatTheme *MainWidget::customChatTheme() const {
if (_mainSection) {
if (const auto custom = _mainSection->customChatTheme()) {
return custom;
}
}
return _history->customChatTheme();
}