Chat-specific theme improvements

This commit is contained in:
Ilya Laktyushin
2021-09-04 00:39:56 +03:00
parent 60c51d8008
commit 79ecba19b0
64 changed files with 510 additions and 359 deletions

View File

@@ -53,7 +53,7 @@ final class ChatRecentActionsController: TelegramBaseController {
} else {
text = strongSelf.presentationData.strings.Channel_AdminLog_InfoPanelAlertText
}
self?.present(textAlertController(context: strongSelf.context, title: strongSelf.presentationData.strings.Channel_AdminLog_InfoPanelAlertTitle, text: text, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
self?.present(textAlertController(context: strongSelf.context, updatedPresentationData: strongSelf.updatedPresentationData, title: strongSelf.presentationData.strings.Channel_AdminLog_InfoPanelAlertTitle, text: text, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
}
})
@@ -177,7 +177,7 @@ final class ChatRecentActionsController: TelegramBaseController {
var presentationData = presentationData
if let themeEmoticon = themeEmoticon, let theme = chatThemes.first(where: { $0.emoji == themeEmoticon }) {
let useDarkAppearance = presentationData.autoNightModeTriggered
let useDarkAppearance = presentationData.theme.overallDarkAppearance
let customTheme = useDarkAppearance ? theme.darkTheme : theme.theme
if let settings = customTheme.settings, let theme = makePresentationTheme(settings: settings, specialMode: true) {
presentationData = presentationData.withUpdated(theme: theme)