From 59bb8b90ed71944d1e0fac4fc90b5633bfae2c10 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Fri, 5 Jul 2019 20:37:03 +0200 Subject: [PATCH 1/3] Implemented customizable accent colors for dark themes and tuned black theme colors --- Telegram-iOS/en.lproj/Localizable.strings | 4 + submodules/Display/Display/UIKitUtils.swift | 10 + .../DefaultDarkAccentPresentationTheme.swift | 679 ++++---- .../DefaultDarkPresentationTheme.swift | 657 ++++---- .../Sources/DefaultPresentationTheme.swift | 1 - .../Sources/PresentationData.swift | 8 +- .../Sources/PresentationStrings.swift | 1418 +++++++++-------- .../Sources/PresentationTheme.swift | 4 +- .../TelegramUI/ChatTextInputAttributes.swift | 2 +- .../TelegramUI/CustomWallpaperPicker.swift | 2 +- .../TelegramUI/ManagedAudioRecorder.swift | 8 +- .../Resources/PresentationStrings.mapping | Bin 118005 -> 118073 bytes .../TelegramUI/TermsOfServiceController.swift | 4 +- .../TelegramUI/ThemeGridController.swift | 4 +- .../TelegramUI/ThemeSettingsController.swift | 214 ++- .../TelegramUI/ThemeSettingsThemeItem.swift | 32 +- .../WallpaperGalleryController.swift | 2 +- .../TelegramUI/WallpaperUploadManager.swift | 2 +- .../TelegramUI/third-party/opusenc/opusenc.m | 18 +- .../Sources/PresentationThemeSettings.swift | 11 +- 20 files changed, 1628 insertions(+), 1452 deletions(-) diff --git a/Telegram-iOS/en.lproj/Localizable.strings b/Telegram-iOS/en.lproj/Localizable.strings index 6bef2c8e20..1d33192eb8 100644 --- a/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram-iOS/en.lproj/Localizable.strings @@ -4464,3 +4464,7 @@ Any member of this group will be able to see messages in the channel."; "CreateGroup.ChannelsTooMuch" = "Sorry, you are a member of too many groups and channels. Please leave some before creating a new one."; "Join.ChannelsTooMuch" = "Sorry, you are a member of too many groups and channels. Please leave some before joining one."; "Invite.ChannelsTooMuch" = "Sorry, the target user is a member of too many groups and channels. Please ask them to leave some first."; + +"Appearance.TintAllColors" = "Tint All Colors"; + +"Contacts.DeselectAll" = "Deselect All"; diff --git a/submodules/Display/Display/UIKitUtils.swift b/submodules/Display/Display/UIKitUtils.swift index 25d1d222a4..82997a9820 100644 --- a/submodules/Display/Display/UIKitUtils.swift +++ b/submodules/Display/Display/UIKitUtils.swift @@ -115,6 +115,16 @@ public extension UIColor { return UIColor(hue: hue, saturation: saturation, brightness: max(0.0, min(1.0, brightness * factor)), alpha: alpha) } + func withMultiplied(hue: CGFloat, saturation: CGFloat, brightness: CGFloat) -> UIColor { + var hueValue: CGFloat = 0.0 + var saturationValue: CGFloat = 0.0 + var brightnessValue: CGFloat = 0.0 + var alphaValue: CGFloat = 0.0 + self.getHue(&hueValue, saturation: &saturationValue, brightness: &brightnessValue, alpha: &alphaValue) + + return UIColor(hue: max(0.0, min(1.0, hueValue * hue)), saturation: max(0.0, min(1.0, saturationValue * saturation)), brightness: max(0.0, min(1.0, brightnessValue * brightness)), alpha: alphaValue) + } + func mixedWith(_ other: UIColor, alpha: CGFloat) -> UIColor { let alpha = min(1.0, max(0.0, alpha)) let oneMinusAlpha = 1.0 - alpha diff --git a/submodules/TelegramPresentationData/Sources/DefaultDarkAccentPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDarkAccentPresentationTheme.swift index 598099f46d..2a3fb432a0 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultDarkAccentPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultDarkAccentPresentationTheme.swift @@ -1,350 +1,379 @@ import Foundation import UIKit -private let accentColor: UIColor = UIColor(rgb: 0x2EA6FF) -private let destructiveColor: UIColor = UIColor(rgb: 0xFF6767) -private let constructiveColor: UIColor = UIColor(rgb: 0x08a723) -private let secretColor: UIColor = UIColor(rgb: 0x89DF9E) +private func makeDarkPresentationTheme(accentColor: UIColor) -> PresentationTheme { + let destructiveColor: UIColor = UIColor(rgb: 0xFF6767) + let constructiveColor: UIColor = UIColor(rgb: 0x08a723) + let secretColor: UIColor = UIColor(rgb: 0x89DF9E) + + let mainBackgroundColor = accentColor.withMultiplied(hue: 1.024, saturation: 0.585, brightness: 0.25) + let mainSelectionColor = accentColor.withMultiplied(hue: 1.03, saturation: 0.585, brightness: 0.12) + let additionalBackgroundColor = accentColor.withMultiplied(hue: 1.024, saturation: 0.573, brightness: 0.18) + + let mainSeparatorColor = accentColor.withMultiplied(hue: 1.039, saturation: 0.560, brightness: 0.14) + let mainForegroundColor = accentColor.withMultiplied(hue: 0.99, saturation: 0.256, brightness: 0.62) + + let mainSecondaryColor = accentColor.withMultiplied(hue: 1.019, saturation: 0.109, brightness: 0.59) + let mainSecondaryTextColor = accentColor.withMultiplied(hue: 0.956, saturation: 0.17, brightness: 1.0) + + let mainFreeTextColor = accentColor.withMultiplied(hue: 1.019, saturation: 0.097, brightness: 0.56) + + let outgoingBubbleColor = accentColor.withMultiplied(hue: 1.019, saturation: 0.731, brightness: 0.59) + let highlightedIncomingBubbleColor = accentColor.withMultiplied(hue: 1.03, saturation: 0.463, brightness: 0.29) + let highlightedOutgoingBubbleColor = accentColor.withMultiplied(hue: 1.019, saturation: 0.609, brightness: 0.63) + + let mainInputColor = accentColor.withMultiplied(hue: 1.029, saturation: 0.609, brightness: 0.19) + let inputBackgroundColor = accentColor.withMultiplied(hue: 1.02, saturation: 0.609, brightness: 0.15) + + let rootStatusBar = PresentationThemeRootNavigationStatusBar( + style: .white + ) -private let rootStatusBar = PresentationThemeRootNavigationStatusBar( - style: .white -) + let rootTabBar = PresentationThemeRootTabBar( + backgroundColor: mainBackgroundColor, + separatorColor: mainSeparatorColor, + iconColor: mainForegroundColor, + selectedIconColor: accentColor, + textColor: mainForegroundColor, + selectedTextColor: accentColor, + badgeBackgroundColor: UIColor(rgb: 0xEF5B5B), + badgeStrokeColor: UIColor(rgb: 0xEF5B5B), + badgeTextColor: UIColor(rgb: 0xffffff) + ) -private let rootTabBar = PresentationThemeRootTabBar( - backgroundColor: UIColor(rgb: 0x213040), - separatorColor: UIColor(rgb: 0x131A23), - iconColor: UIColor(rgb: 0x7e929f), - selectedIconColor: accentColor, - textColor: UIColor(rgb: 0x7e929f), - selectedTextColor: accentColor, - badgeBackgroundColor: UIColor(rgb: 0xEF5B5B), - badgeStrokeColor: UIColor(rgb: 0xEF5B5B), - badgeTextColor: UIColor(rgb: 0xffffff) -) + let rootNavigationBar = PresentationThemeRootNavigationBar( + buttonColor: accentColor, + disabledButtonColor: accentColor.withMultiplied(hue: 1.033, saturation: 0.219, brightness: 0.44), + primaryTextColor: UIColor(rgb: 0xffffff), + secondaryTextColor: mainSecondaryColor, + controlColor: mainSecondaryColor, + accentTextColor: accentColor, + backgroundColor: mainBackgroundColor, + separatorColor: mainSeparatorColor, + badgeBackgroundColor: UIColor(rgb: 0xEF5B5B), + badgeStrokeColor: UIColor(rgb: 0xEF5B5B), + badgeTextColor: UIColor(rgb: 0xffffff) + ) -private let rootNavigationBar = PresentationThemeRootNavigationBar( - buttonColor: accentColor, - disabledButtonColor: UIColor(rgb: 0x5b646f), - primaryTextColor: UIColor(rgb: 0xffffff), - secondaryTextColor: UIColor(rgb: 0x8B9197), - controlColor: UIColor(rgb: 0x8B9197), - accentTextColor: accentColor, - backgroundColor: UIColor(rgb: 0x213040), - separatorColor: UIColor(rgb: 0x131A23), - badgeBackgroundColor: UIColor(rgb: 0xEF5B5B), - badgeStrokeColor: UIColor(rgb: 0xEF5B5B), - badgeTextColor: UIColor(rgb: 0xffffff) -) + let activeNavigationSearchBar = PresentationThemeActiveNavigationSearchBar( + backgroundColor: mainBackgroundColor, + accentColor: accentColor, + inputFillColor: mainInputColor, + inputTextColor: UIColor(rgb: 0xffffff), + inputPlaceholderTextColor: mainSecondaryColor, + inputIconColor: mainSecondaryColor, + inputClearButtonColor: mainSecondaryColor, + separatorColor: additionalBackgroundColor + ) -private let activeNavigationSearchBar = PresentationThemeActiveNavigationSearchBar( - backgroundColor: UIColor(rgb: 0x213040), - accentColor: accentColor, - inputFillColor: UIColor(rgb: 0x182330), - inputTextColor: UIColor(rgb: 0xffffff), - inputPlaceholderTextColor: UIColor(rgb: 0x8B9197), - inputIconColor: UIColor(rgb: 0x8B9197), - inputClearButtonColor: UIColor(rgb: 0x8B9197), - separatorColor: UIColor(rgb: 0x18222C) -) + let auth = PresentationThemeAuth( + introStartButton: accentColor, + introDotColor: mainSecondaryColor + ) -private let auth = PresentationThemeAuth( - introStartButton: accentColor, - introDotColor: UIColor(rgb: 0x8B9197) -) + let passcode = PresentationThemePasscode( + backgroundColors: (accentColor.withMultiplied(hue: 1.049, saturation: 0.573, brightness: 0.47), additionalBackgroundColor), + buttonColor: mainBackgroundColor + ) -private let passcode = PresentationThemePasscode( - backgroundColors: (UIColor(rgb: 0x1d2937), UIColor(rgb: 0x18222d)), - buttonColor: UIColor(rgb: 0x213040) - //backgroundColors: (UIColor(rgb: 0x263646), UIColor(rgb: 0x213040)), - //buttonColor: UIColor(rgb: 0x7e93a0) -) + let rootController = PresentationThemeRootController( + statusBar: rootStatusBar, + tabBar: rootTabBar, + navigationBar: rootNavigationBar, + activeNavigationSearchBar: activeNavigationSearchBar + ) -private let rootController = PresentationThemeRootController( - statusBar: rootStatusBar, - tabBar: rootTabBar, - navigationBar: rootNavigationBar, - activeNavigationSearchBar: activeNavigationSearchBar -) + let switchColors = PresentationThemeSwitch( + frameColor: mainSecondaryTextColor.withAlphaComponent(0.5), + handleColor: UIColor(rgb: 0x121212), + contentColor: accentColor, + positiveColor: accentColor, + negativeColor: destructiveColor + ) -private let switchColors = PresentationThemeSwitch( - frameColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - handleColor: UIColor(rgb: 0x121212), - contentColor: accentColor, - positiveColor: accentColor, - negativeColor: destructiveColor -) + let list = PresentationThemeList( + blocksBackgroundColor: additionalBackgroundColor, + plainBackgroundColor: additionalBackgroundColor, + itemPrimaryTextColor: UIColor(rgb: 0xffffff), + itemSecondaryTextColor: mainSecondaryTextColor.withAlphaComponent(0.5), + itemDisabledTextColor: mainSecondaryTextColor.withAlphaComponent(0.5), + itemAccentColor: accentColor, + itemHighlightedColor: UIColor(rgb: 0x28b772), + itemDestructiveColor: destructiveColor, + itemPlaceholderTextColor: mainSecondaryTextColor.withAlphaComponent(0.5), + itemBlocksBackgroundColor: mainBackgroundColor, + itemHighlightedBackgroundColor: mainSelectionColor, + itemBlocksSeparatorColor: mainSeparatorColor, + itemPlainSeparatorColor: mainSeparatorColor, + disclosureArrowColor: mainSecondaryTextColor.withAlphaComponent(0.5), + sectionHeaderTextColor: mainFreeTextColor, + freeTextColor: mainFreeTextColor, + freeTextErrorColor: destructiveColor, + freeTextSuccessColor: UIColor(rgb: 0x30cf30), + freeMonoIcon: mainFreeTextColor, + itemSwitchColors: switchColors, + itemDisclosureActions: PresentationThemeItemDisclosureActions( + neutral1: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x007cd6), foregroundColor: .white), + neutral2: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xcd7800), foregroundColor: .white), + destructive: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xc70c0c), foregroundColor: .white), + constructive: PresentationThemeItemDisclosureAction(fillColor: constructiveColor, foregroundColor: .white), + accent: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x007cd6), foregroundColor: .white), + warning: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xcd7800), foregroundColor: .white), + inactive: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x26384c), foregroundColor: .white) + ), + itemCheckColors: PresentationThemeCheck( + strokeColor: mainSecondaryTextColor.withAlphaComponent(0.5), + fillColor: accentColor, + foregroundColor: .white + ), + controlSecondaryColor: mainSecondaryTextColor.withAlphaComponent(0.5), + freeInputField: PresentationInputFieldTheme( + backgroundColor: mainSecondaryTextColor.withAlphaComponent(0.5), + placeholderColor: UIColor(rgb: 0x4d4d4d), + primaryColor: .white, + controlColor: UIColor(rgb: 0x4d4d4d) + ), + mediaPlaceholderColor: UIColor(rgb: 0x1e2c3a), + scrollIndicatorColor: UIColor(white: 1.0, alpha: 0.3), + pageIndicatorInactiveColor: mainSecondaryTextColor.withAlphaComponent(0.4), + inputClearButtonColor: mainSecondaryColor + ) -private let list = PresentationThemeList( - blocksBackgroundColor: UIColor(rgb: 0x18222D), - plainBackgroundColor: UIColor(rgb: 0x18222D), - itemPrimaryTextColor: UIColor(rgb: 0xffffff), - itemSecondaryTextColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - itemDisabledTextColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), //!!! - itemAccentColor: accentColor, - itemHighlightedColor: UIColor(rgb: 0x28b772), - itemDestructiveColor: destructiveColor, - itemPlaceholderTextColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), //!!! - itemBlocksBackgroundColor: UIColor(rgb: 0x213040), - itemHighlightedBackgroundColor: UIColor(rgb: 0x10171F), - itemBlocksSeparatorColor: UIColor(rgb: 0x131A23), - itemPlainSeparatorColor: UIColor(rgb: 0x131A23), - disclosureArrowColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), //!!! - sectionHeaderTextColor: UIColor(rgb: 0x82888E), - freeTextColor: UIColor(rgb: 0x82888E), - freeTextErrorColor: destructiveColor, //!!! - freeTextSuccessColor: UIColor(rgb: 0x30cf30), //!!! - freeMonoIcon: UIColor(rgb: 0x82888E), - itemSwitchColors: switchColors, - itemDisclosureActions: PresentationThemeItemDisclosureActions( - neutral1: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x007cd6), foregroundColor: .white), - neutral2: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xcd7800), foregroundColor: .white), - destructive: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xc70c0c), foregroundColor: .white), - constructive: PresentationThemeItemDisclosureAction(fillColor: constructiveColor, foregroundColor: .white), - accent: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x007cd6), foregroundColor: .white), - warning: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xcd7800), foregroundColor: .white), - inactive: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x26384c), foregroundColor: .white) - ), - itemCheckColors: PresentationThemeCheck( - strokeColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - fillColor: accentColor, - foregroundColor: .white - ), - controlSecondaryColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - freeInputField: PresentationInputFieldTheme( - backgroundColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - placeholderColor: UIColor(rgb: 0x4d4d4d), - primaryColor: .white, - controlColor: UIColor(rgb: 0x4d4d4d) - ), - mediaPlaceholderColor: UIColor(rgb: 0x1e2c3a), - scrollIndicatorColor: UIColor(white: 1.0, alpha: 0.3), - pageIndicatorInactiveColor: UIColor(rgb: 0xDBF5FF, alpha: 0.4), - inputClearButtonColor: UIColor(rgb: 0x8B9197) -) + let chatList = PresentationThemeChatList( + backgroundColor: additionalBackgroundColor, + itemSeparatorColor: mainSeparatorColor, + itemBackgroundColor: additionalBackgroundColor, + pinnedItemBackgroundColor: mainBackgroundColor, + itemHighlightedBackgroundColor: mainSelectionColor, + itemSelectedBackgroundColor: mainSelectionColor, + titleColor: UIColor(rgb: 0xffffff), + secretTitleColor: secretColor, + dateTextColor: mainSecondaryTextColor.withAlphaComponent(0.5), + authorNameColor: UIColor(rgb: 0xffffff), + messageTextColor: mainSecondaryTextColor.withAlphaComponent(0.5), + messageDraftTextColor: UIColor(rgb: 0xdd4b39), + checkmarkColor: accentColor, + pendingIndicatorColor: mainSecondaryTextColor.withAlphaComponent(0.4), + failedFillColor: destructiveColor, + failedForegroundColor: .white, + muteIconColor: mainSecondaryTextColor.withAlphaComponent(0.4), + unreadBadgeActiveBackgroundColor: accentColor, + unreadBadgeActiveTextColor: UIColor(rgb: 0xffffff), + unreadBadgeInactiveBackgroundColor: mainSecondaryTextColor.withAlphaComponent(0.4), + unreadBadgeInactiveTextColor: additionalBackgroundColor, + pinnedBadgeColor: mainSecondaryTextColor.withAlphaComponent(0.5), + pinnedSearchBarColor: mainInputColor, + regularSearchBarColor: accentColor.withMultiplied(hue: 1.029, saturation: 0.609, brightness: 0.12), + sectionHeaderFillColor: mainBackgroundColor, + sectionHeaderTextColor: mainSecondaryTextColor.withAlphaComponent(0.5), + searchBarKeyboardColor: .dark, + verifiedIconFillColor: accentColor, + verifiedIconForegroundColor: .white, + secretIconColor: secretColor, + pinnedArchiveAvatarColor: PresentationThemeArchiveAvatarColors(backgroundColors: (UIColor(rgb: 0x72d5fd), UIColor(rgb: 0x2a9ef1)), foregroundColor: .white), + unpinnedArchiveAvatarColor: PresentationThemeArchiveAvatarColors(backgroundColors: (UIColor(rgb: 0x5d6d77), UIColor(rgb: 0x4e5c64)), foregroundColor: additionalBackgroundColor), + onlineDotColor: UIColor(rgb: 0x4cc91f) + ) -private let chatList = PresentationThemeChatList( - backgroundColor: UIColor(rgb: 0x18222D), - itemSeparatorColor: UIColor(rgb: 0x131A23), - itemBackgroundColor: UIColor(rgb: 0x18222D), - pinnedItemBackgroundColor: UIColor(rgb: 0x213040), - itemHighlightedBackgroundColor: UIColor(rgb: 0x10171F), - itemSelectedBackgroundColor: UIColor(rgb: 0x10171F), - titleColor: UIColor(rgb: 0xffffff), - secretTitleColor: secretColor, - dateTextColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - authorNameColor: UIColor(rgb: 0xffffff), - messageTextColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - messageDraftTextColor: UIColor(rgb: 0xdd4b39), //!!! - checkmarkColor: accentColor, - pendingIndicatorColor: UIColor(rgb: 0x8E8E93), - failedFillColor: destructiveColor, - failedForegroundColor: .white, - muteIconColor: UIColor(rgb: 0x8E8E93), - unreadBadgeActiveBackgroundColor: accentColor, - unreadBadgeActiveTextColor: UIColor(rgb: 0xffffff), - unreadBadgeInactiveBackgroundColor: UIColor(rgb: 0xDBF5FF, alpha: 0.4), - unreadBadgeInactiveTextColor: UIColor(rgb: 0x000000), - pinnedBadgeColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - pinnedSearchBarColor: UIColor(rgb: 0x182330), - regularSearchBarColor: UIColor(rgb: 0x0F161E), - sectionHeaderFillColor: UIColor(rgb: 0x213040), - sectionHeaderTextColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - searchBarKeyboardColor: .dark, - verifiedIconFillColor: accentColor, - verifiedIconForegroundColor: .white, - secretIconColor: secretColor, - pinnedArchiveAvatarColor: PresentationThemeArchiveAvatarColors(backgroundColors: (UIColor(rgb: 0x72d5fd), UIColor(rgb: 0x2a9ef1)), foregroundColor: .white), - unpinnedArchiveAvatarColor: PresentationThemeArchiveAvatarColors(backgroundColors: (UIColor(rgb: 0x5d6d77), UIColor(rgb: 0x4e5c64)), foregroundColor: UIColor(rgb: 0x18222d)), - onlineDotColor: UIColor(rgb: 0x4cc91f) -) + let bubble = PresentationThemeChatBubble( + incoming: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: mainBackgroundColor, highlightedFill: highlightedIncomingBubbleColor, stroke: mainBackgroundColor), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: mainBackgroundColor, highlightedFill: highlightedIncomingBubbleColor, stroke: mainBackgroundColor)), + outgoing: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: outgoingBubbleColor, highlightedFill: highlightedOutgoingBubbleColor, stroke: outgoingBubbleColor), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: outgoingBubbleColor, highlightedFill: highlightedOutgoingBubbleColor, stroke: outgoingBubbleColor)), + freeform: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: mainBackgroundColor, highlightedFill: highlightedIncomingBubbleColor, stroke: mainBackgroundColor), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: mainBackgroundColor, highlightedFill: highlightedIncomingBubbleColor, stroke: mainBackgroundColor)), + incomingPrimaryTextColor: UIColor(rgb: 0xffffff), + incomingSecondaryTextColor: mainSecondaryTextColor.withAlphaComponent(0.5), + incomingLinkTextColor: accentColor, + incomingLinkHighlightColor: accentColor.withAlphaComponent(0.5), + incomingScamColor: destructiveColor, + outgoingPrimaryTextColor: UIColor(rgb: 0xffffff), + outgoingSecondaryTextColor: mainSecondaryTextColor.withAlphaComponent(0.5), + outgoingLinkTextColor: accentColor, + outgoingLinkHighlightColor: accentColor.withAlphaComponent(0.5), + outgoingScamColor: destructiveColor, + infoPrimaryTextColor: UIColor(rgb: 0xffffff), + infoLinkTextColor: accentColor, + incomingTextHighlightColor: UIColor(rgb: 0xffe438), + outgoingTextHighlightColor: UIColor(rgb: 0xffe438), + incomingAccentTextColor: UIColor(rgb: 0xffffff), + outgoingAccentTextColor: UIColor(rgb: 0xffffff), + incomingAccentControlColor: UIColor(rgb: 0xffffff), + outgoingAccentControlColor: UIColor(rgb: 0xffffff), + incomingMediaActiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.6), + outgoingMediaActiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.6), + incomingMediaInactiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.3), + outgoingMediaInactiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.3), + outgoingCheckColor: accentColor.withMultiplied(hue: 0.99, saturation: 0.743, brightness: 1.0), + incomingPendingActivityColor: mainSecondaryTextColor.withAlphaComponent(0.5), + outgoingPendingActivityColor: mainSecondaryTextColor.withAlphaComponent(0.5), + mediaDateAndStatusFillColor: UIColor(white: 0.0, alpha: 0.5), + mediaDateAndStatusTextColor: .white, + incomingFileTitleColor: UIColor(rgb: 0xffffff), + outgoingFileTitleColor: UIColor(rgb: 0xffffff), + incomingFileDescriptionColor: mainSecondaryTextColor.withAlphaComponent(0.5), + outgoingFileDescriptionColor: mainSecondaryTextColor.withAlphaComponent(0.5), + incomingFileDurationColor: mainSecondaryTextColor.withAlphaComponent(0.5), + outgoingFileDurationColor: mainSecondaryTextColor.withAlphaComponent(0.5), + shareButtonFillColor: PresentationThemeVariableColor(color: additionalBackgroundColor.withAlphaComponent(0.5)), + shareButtonStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0x587fa3, alpha: 0.15)), + shareButtonForegroundColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xb2b2b2)), + mediaOverlayControlBackgroundColor: UIColor(white: 0.0, alpha: 0.6), + mediaOverlayControlForegroundColor: UIColor(white: 1.0, alpha: 1.0), + actionButtonsIncomingFillColor: PresentationThemeVariableColor(withWallpaper: additionalBackgroundColor.withAlphaComponent(0.5), withoutWallpaper: additionalBackgroundColor.withAlphaComponent(0.5)), + actionButtonsIncomingStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0x587fa3, alpha: 0.15)), + actionButtonsIncomingTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)), + actionButtonsOutgoingFillColor: PresentationThemeVariableColor(withWallpaper: additionalBackgroundColor.withAlphaComponent(0.5), withoutWallpaper: additionalBackgroundColor.withAlphaComponent(0.5)), + actionButtonsOutgoingStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0x587fa3, alpha: 0.15)), + actionButtonsOutgoingTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)), + selectionControlBorderColor: .white, + selectionControlFillColor: accentColor, + selectionControlForegroundColor: .white, + mediaHighlightOverlayColor: UIColor(white: 1.0, alpha: 0.6), + deliveryFailedFillColor: destructiveColor, + deliveryFailedForegroundColor: .white, + incomingMediaPlaceholderColor: UIColor(rgb: 0x1e2c3a), + outgoingMediaPlaceholderColor: UIColor(rgb: 0x2d5883), + incomingPolls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0x617583), radioProgress: accentColor, highlight: accentColor.withAlphaComponent(0.12), separator: mainSeparatorColor, bar: accentColor), + outgoingPolls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0x8eaac0), radioProgress: UIColor(rgb: 0x89d0ff), highlight: UIColor(rgb: 0x89d0ff).withAlphaComponent(0.12), separator: UIColor(rgb: 0x264b70), bar: UIColor(rgb: 0x89d0ff)) + ) -private let bubble = PresentationThemeChatBubble( - incoming: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x213040), highlightedFill: UIColor(rgb: 0x2D3A49), stroke: UIColor(rgb: 0x213040)), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x213040), highlightedFill: UIColor(rgb: 0x2D3A49), stroke: UIColor(rgb: 0x213040))), - outgoing: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x3D6A97), highlightedFill: UIColor(rgb: 0x5079A1), stroke: UIColor(rgb: 0x3D6A97)), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x3D6A97), highlightedFill: UIColor(rgb: 0x5079A1), stroke: UIColor(rgb: 0x3D6A97))), - freeform: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x213040), highlightedFill: UIColor(rgb: 0x2D3A49), stroke: UIColor(rgb: 0x213040)), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x213040), highlightedFill: UIColor(rgb: 0x2D3A49), stroke: UIColor(rgb: 0x213040))), - incomingPrimaryTextColor: UIColor(rgb: 0xffffff), - incomingSecondaryTextColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - incomingLinkTextColor: accentColor, - incomingLinkHighlightColor: accentColor.withAlphaComponent(0.5), - incomingScamColor: destructiveColor, - outgoingPrimaryTextColor: UIColor(rgb: 0xffffff), - outgoingSecondaryTextColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - outgoingLinkTextColor: accentColor, - outgoingLinkHighlightColor: accentColor.withAlphaComponent(0.5), - outgoingScamColor: destructiveColor, - infoPrimaryTextColor: UIColor(rgb: 0xffffff), - infoLinkTextColor: accentColor, - incomingTextHighlightColor: UIColor(rgb: 0xffe438), - outgoingTextHighlightColor: UIColor(rgb: 0xffe438), - incomingAccentTextColor: UIColor(rgb: 0xffffff), - outgoingAccentTextColor: UIColor(rgb: 0xffffff), - incomingAccentControlColor: UIColor(rgb: 0xffffff), - outgoingAccentControlColor: UIColor(rgb: 0xffffff), - incomingMediaActiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.6), - outgoingMediaActiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.6), - incomingMediaInactiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.3), - outgoingMediaInactiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.3), - outgoingCheckColor: UIColor(rgb: 0x64c0ff), - incomingPendingActivityColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - outgoingPendingActivityColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - mediaDateAndStatusFillColor: UIColor(white: 0.0, alpha: 0.5), - mediaDateAndStatusTextColor: .white, - incomingFileTitleColor: UIColor(rgb: 0xffffff), - outgoingFileTitleColor: UIColor(rgb: 0xffffff), - incomingFileDescriptionColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - outgoingFileDescriptionColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - incomingFileDurationColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - outgoingFileDurationColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - shareButtonFillColor: PresentationThemeVariableColor(color: UIColor(rgb: 0x18222d, alpha: 0.5)), - shareButtonStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0x587fa3, alpha: 0.15)), - shareButtonForegroundColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xb2b2b2)), - mediaOverlayControlBackgroundColor: UIColor(white: 0.0, alpha: 0.6), //!!! - mediaOverlayControlForegroundColor: UIColor(white: 1.0, alpha: 1.0), //!!! - actionButtonsIncomingFillColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0x18222D, alpha: 0.5), withoutWallpaper: UIColor(rgb: 0x18222D, alpha: 0.5)), - actionButtonsIncomingStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0x587fa3, alpha: 0.15)), - actionButtonsIncomingTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)), - actionButtonsOutgoingFillColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0x18222D, alpha: 0.5), withoutWallpaper: UIColor(rgb: 0x18222D, alpha: 0.5)), - actionButtonsOutgoingStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0x587fa3, alpha: 0.15)), - actionButtonsOutgoingTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)), - selectionControlBorderColor: .white, - selectionControlFillColor: accentColor, - selectionControlForegroundColor: .white, - mediaHighlightOverlayColor: UIColor(white: 1.0, alpha: 0.6), - deliveryFailedFillColor: destructiveColor, - deliveryFailedForegroundColor: .white, - incomingMediaPlaceholderColor: UIColor(rgb: 0x1e2c3a), - outgoingMediaPlaceholderColor: UIColor(rgb: 0x2d5883), - incomingPolls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0x617583), radioProgress: accentColor, highlight: accentColor.withAlphaComponent(0.12), separator: UIColor(rgb: 0x131a23), bar: accentColor), - outgoingPolls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0x8eaac0), radioProgress: UIColor(rgb: 0x89d0ff), highlight: UIColor(rgb: 0x89d0ff).withAlphaComponent(0.12), separator: UIColor(rgb: 0x264b70), bar: UIColor(rgb: 0x89d0ff)) -) + let serviceMessage = PresentationThemeServiceMessage( + components: PresentationThemeServiceMessageColor(withDefaultWallpaper: PresentationThemeServiceMessageColorComponents(fill: additionalBackgroundColor, primaryText: .white, linkHighlight: UIColor(rgb: 0xffffff, alpha: 0.12), scam: destructiveColor, dateFillStatic: additionalBackgroundColor, dateFillFloating: additionalBackgroundColor.withAlphaComponent(0.2)), withCustomWallpaper: PresentationThemeServiceMessageColorComponents(fill: additionalBackgroundColor, primaryText: .white, linkHighlight: UIColor(rgb: 0xffffff, alpha: 0.12), scam: destructiveColor, dateFillStatic: additionalBackgroundColor, dateFillFloating: additionalBackgroundColor.withAlphaComponent(0.2))), + unreadBarFillColor: mainBackgroundColor, + unreadBarStrokeColor: mainBackgroundColor, + unreadBarTextColor: UIColor(rgb: 0xffffff), + dateTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)) + ) -private let serviceMessage = PresentationThemeServiceMessage( - components: PresentationThemeServiceMessageColor(withDefaultWallpaper: PresentationThemeServiceMessageColorComponents(fill: UIColor(rgb: 0x18222D, alpha: 1.0), primaryText: .white, linkHighlight: UIColor(rgb: 0xffffff, alpha: 0.12), scam: destructiveColor, dateFillStatic: UIColor(rgb: 0x18222D, alpha: 1.0), dateFillFloating: UIColor(rgb: 0x18222D, alpha: 0.2)), withCustomWallpaper: PresentationThemeServiceMessageColorComponents(fill: UIColor(rgb: 0x18222D, alpha: 1.0), primaryText: .white, linkHighlight: UIColor(rgb: 0xffffff, alpha: 0.12), scam: destructiveColor, dateFillStatic: UIColor(rgb: 0x18222D, alpha: 1.0), dateFillFloating: UIColor(rgb: 0x18222D, alpha: 0.2))), - unreadBarFillColor: UIColor(rgb: 0x213040), - unreadBarStrokeColor: UIColor(rgb: 0x213040), - unreadBarTextColor: UIColor(rgb: 0xffffff), - dateTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)) -) + let inputPanelMediaRecordingControl = PresentationThemeChatInputPanelMediaRecordingControl( + buttonColor: accentColor, + micLevelColor: accentColor.withAlphaComponent(0.2), + activeIconColor: .white, + panelControlFillColor: mainBackgroundColor, + panelControlStrokeColor: mainBackgroundColor, + panelControlContentPrimaryColor: mainSecondaryTextColor.withAlphaComponent(0.5), + panelControlContentAccentColor: accentColor + ) -private let inputPanelMediaRecordingControl = PresentationThemeChatInputPanelMediaRecordingControl( - buttonColor: accentColor, - micLevelColor: accentColor.withAlphaComponent(0.2), - activeIconColor: .white, - panelControlFillColor: UIColor(rgb: 0x213040), - panelControlStrokeColor: UIColor(rgb: 0x213040), - panelControlContentPrimaryColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), //!!! - panelControlContentAccentColor: accentColor -) + let inputPanel = PresentationThemeChatInputPanel( + panelBackgroundColor: mainBackgroundColor, + panelStrokeColor: mainSeparatorColor, + panelControlAccentColor: accentColor, + panelControlColor: mainSecondaryTextColor.withAlphaComponent(0.5), + panelControlDisabledColor: UIColor(rgb: 0x90979F, alpha: 0.5), + panelControlDestructiveColor: destructiveColor, + inputBackgroundColor: inputBackgroundColor, + inputStrokeColor: inputBackgroundColor, + inputPlaceholderColor: mainSecondaryTextColor.withAlphaComponent(0.4), + inputTextColor: UIColor(rgb: 0xffffff), + inputControlColor: mainSecondaryTextColor.withAlphaComponent(0.4), + actionControlFillColor: accentColor, + actionControlForegroundColor: .white, + primaryTextColor: UIColor(rgb: 0xffffff), + secondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), + mediaRecordingDotColor: accentColor, + keyboardColor: .dark, + mediaRecordingControl: inputPanelMediaRecordingControl + ) -private let inputPanel = PresentationThemeChatInputPanel( - panelBackgroundColor: UIColor(rgb: 0x213040), - panelStrokeColor: UIColor(rgb: 0x131A23), - panelControlAccentColor: accentColor, - panelControlColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - panelControlDisabledColor: UIColor(rgb: 0x90979F, alpha: 0.5), //!!! - panelControlDestructiveColor: destructiveColor, - inputBackgroundColor: UIColor(rgb: 0x131C26), - inputStrokeColor: UIColor(rgb: 0x131C26), - inputPlaceholderColor: UIColor(rgb: 0xDBF5FF, alpha: 0.4), - inputTextColor: UIColor(rgb: 0xffffff), - inputControlColor: UIColor(rgb: 0xDBF5FF, alpha: 0.4), - actionControlFillColor: accentColor, - actionControlForegroundColor: .white, - primaryTextColor: UIColor(rgb: 0xffffff), - secondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), - mediaRecordingDotColor: accentColor, - keyboardColor: .dark, - mediaRecordingControl: inputPanelMediaRecordingControl -) + let inputMediaPanel = PresentationThemeInputMediaPanel( + panelSeparatorColor: mainBackgroundColor, + panelIconColor: mainSecondaryTextColor.withAlphaComponent(0.5), + panelHighlightedIconBackgroundColor: inputBackgroundColor, + stickersBackgroundColor: additionalBackgroundColor, + stickersSectionTextColor: mainSecondaryTextColor.withAlphaComponent(0.5), + stickersSearchBackgroundColor: UIColor(rgb: 0x121c25), + stickersSearchPlaceholderColor: UIColor(rgb: 0x788a96), + stickersSearchPrimaryColor: .white, + stickersSearchControlColor: UIColor(rgb: 0x788a96), + gifsBackgroundColor: additionalBackgroundColor + ) -private let inputMediaPanel = PresentationThemeInputMediaPanel( - panelSeparatorColor: UIColor(rgb: 0x213040), - panelIconColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - panelHighlightedIconBackgroundColor: UIColor(rgb: 0x131C26), //!!! - stickersBackgroundColor: UIColor(rgb: 0x18222d), - stickersSectionTextColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - stickersSearchBackgroundColor: UIColor(rgb: 0x121c25), - stickersSearchPlaceholderColor: UIColor(rgb: 0x788a96), - stickersSearchPrimaryColor: .white, - stickersSearchControlColor: UIColor(rgb: 0x788a96), - gifsBackgroundColor: UIColor(rgb: 0x18222d) -) + let inputButtonPanel = PresentationThemeInputButtonPanel( + panelSeparatorColor: mainBackgroundColor, + panelBackgroundColor: UIColor(rgb: 0x161A20), + buttonFillColor: UIColor(rgb: 0x5B5F62), + buttonStrokeColor: UIColor(rgb: 0x0D1013), + buttonHighlightedFillColor: UIColor(rgb: 0x5B5F62, alpha: 0.7), + buttonHighlightedStrokeColor: UIColor(rgb: 0x0D1013), + buttonTextColor: UIColor(rgb: 0xffffff) + ) -private let inputButtonPanel = PresentationThemeInputButtonPanel( - panelSeparatorColor: UIColor(rgb: 0x213040), - panelBackgroundColor: UIColor(rgb: 0x161A20), - buttonFillColor: UIColor(rgb: 0x5B5F62), - buttonStrokeColor: UIColor(rgb: 0x0D1013), - buttonHighlightedFillColor: UIColor(rgb: 0x5B5F62, alpha: 0.7), - buttonHighlightedStrokeColor: UIColor(rgb: 0x0D1013), - buttonTextColor: UIColor(rgb: 0xffffff) -) + let historyNavigation = PresentationThemeChatHistoryNavigation( + fillColor: mainBackgroundColor, + strokeColor: mainSeparatorColor, + foregroundColor: mainSecondaryTextColor.withAlphaComponent(0.5), + badgeBackgroundColor: accentColor, + badgeStrokeColor: accentColor, + badgeTextColor: .white + ) -private let historyNavigation = PresentationThemeChatHistoryNavigation( - fillColor: UIColor(rgb: 0x213040), - strokeColor: UIColor(rgb: 0x131A23), - foregroundColor: UIColor(rgb: 0xDBF5FF, alpha: 0.5), - badgeBackgroundColor: accentColor, - badgeStrokeColor: accentColor, - badgeTextColor: .white -) + let chat = PresentationThemeChat( + bubble: bubble, + serviceMessage: serviceMessage, + inputPanel: inputPanel, + inputMediaPanel: inputMediaPanel, + inputButtonPanel: inputButtonPanel, + historyNavigation: historyNavigation + ) -private let chat = PresentationThemeChat( - bubble: bubble, - serviceMessage: serviceMessage, - inputPanel: inputPanel, - inputMediaPanel: inputMediaPanel, - inputButtonPanel: inputButtonPanel, - historyNavigation: historyNavigation -) - -private let actionSheet = PresentationThemeActionSheet( - dimColor: UIColor(white: 0.0, alpha: 0.5), - backgroundType: .dark, - opaqueItemBackgroundColor: UIColor(rgb: 0x213040), - itemBackgroundColor: UIColor(rgb: 0x213040, alpha: 0.8), - opaqueItemHighlightedBackgroundColor: UIColor(rgb: 0x10171F), - itemHighlightedBackgroundColor: UIColor(rgb: 0x10171F, alpha: 0.2), //!!! - standardActionTextColor: accentColor, - opaqueItemSeparatorColor: UIColor(rgb: 0x18222D), - destructiveActionTextColor: destructiveColor, - disabledActionTextColor: UIColor(white: 1.0, alpha: 0.5), //!!! - primaryTextColor: .white, - secondaryTextColor: UIColor(white: 1.0, alpha: 0.5), //!!! - controlAccentColor: accentColor, - inputBackgroundColor: UIColor(rgb: 0x182330), //!!! - inputHollowBackgroundColor: UIColor(rgb: 0x182330), - inputBorderColor: UIColor(rgb: 0x182330), - inputPlaceholderColor: UIColor(rgb: 0x8B9197), //!!! - inputTextColor: .white, - inputClearButtonColor: UIColor(rgb: 0x8B9197), - checkContentColor: .white -) - -private let inAppNotification = PresentationThemeInAppNotification( - fillColor: UIColor(rgb: 0x213040), - primaryTextColor: .white, - expandedNotification: PresentationThemeExpandedNotification( + let actionSheet = PresentationThemeActionSheet( + dimColor: UIColor(white: 0.0, alpha: 0.5), backgroundType: .dark, - navigationBar: PresentationThemeExpandedNotificationNavigationBar( - backgroundColor: UIColor(rgb: 0x213040), - primaryTextColor: UIColor(rgb: 0xffffff), - controlColor: accentColor, - separatorColor: UIColor(rgb: 0x131A23) + opaqueItemBackgroundColor: mainBackgroundColor, + itemBackgroundColor: mainBackgroundColor.withAlphaComponent(0.8), + opaqueItemHighlightedBackgroundColor: mainSelectionColor, + itemHighlightedBackgroundColor: mainSelectionColor.withAlphaComponent(0.2), + standardActionTextColor: accentColor, + opaqueItemSeparatorColor: additionalBackgroundColor, + destructiveActionTextColor: destructiveColor, + disabledActionTextColor: UIColor(white: 1.0, alpha: 0.5), + primaryTextColor: .white, + secondaryTextColor: UIColor(white: 1.0, alpha: 0.5), + controlAccentColor: accentColor, + inputBackgroundColor: mainInputColor, + inputHollowBackgroundColor: mainInputColor, + inputBorderColor: mainInputColor, + inputPlaceholderColor: mainSecondaryColor, + inputTextColor: .white, + inputClearButtonColor: mainSecondaryColor, + checkContentColor: .white + ) + + let inAppNotification = PresentationThemeInAppNotification( + fillColor: mainBackgroundColor, + primaryTextColor: .white, + expandedNotification: PresentationThemeExpandedNotification( + backgroundType: .dark, + navigationBar: PresentationThemeExpandedNotificationNavigationBar( + backgroundColor: mainBackgroundColor, + primaryTextColor: UIColor(rgb: 0xffffff), + controlColor: accentColor, + separatorColor: mainSeparatorColor + ) ) ) -) -public let defaultDarkAccentPresentationTheme = PresentationTheme( - name: .builtin(.nightAccent), - overallDarkAppearance: true, - allowsCustomWallpapers: false, - auth: auth, - passcode: passcode, - rootController: rootController, - list: list, - chatList: chatList, - chat: chat, - actionSheet: actionSheet, - inAppNotification: inAppNotification -) + return PresentationTheme( + name: .builtin(.nightAccent), + overallDarkAppearance: true, + auth: auth, + passcode: passcode, + rootController: rootController, + list: list, + chatList: chatList, + chat: chat, + actionSheet: actionSheet, + inAppNotification: inAppNotification + ) +} + +public let defaultDarkAccentPresentationTheme = makeDarkAccentPresentationTheme(accentColor: 0x2EA6FF) + +public func makeDarkAccentPresentationTheme(accentColor: Int32?) -> PresentationTheme { + let color: UIColor + if let accentColor = accentColor { + color = UIColor(rgb: UInt32(bitPattern: accentColor)) + } else { + color = UIColor(rgb: UInt32(bitPattern: defaultDayAccentColor)) + } + return makeDarkPresentationTheme(accentColor: color) +} diff --git a/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift index e5fe40e107..20924767c1 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultDarkPresentationTheme.swift @@ -1,348 +1,363 @@ import Foundation import UIKit -private let accentColor: UIColor = UIColor(rgb: 0xffffff) -private let destructiveColor: UIColor = UIColor(rgb: 0xFF736B) -private let constructiveColor: UIColor = UIColor(rgb: 0x08a723) -private let secretColor: UIColor = UIColor(rgb: 0x00B12C) +//private let accentColor: UIColor = UIColor(rgb: 0xffffff) -private let rootStatusBar = PresentationThemeRootNavigationStatusBar( - style: .white -) +private func makeDarkPresentationTheme(accentColor: UIColor) -> PresentationTheme { + let destructiveColor: UIColor = UIColor(rgb: 0xeb5545) + let constructiveColor: UIColor = UIColor(rgb: 0x08a723) + let secretColor: UIColor = UIColor(rgb: 0x00B12C) -private let rootTabBar = PresentationThemeRootTabBar( - backgroundColor: UIColor(rgb: 0x1c1c1d), - separatorColor: UIColor(rgb: 0x000000), - iconColor: UIColor(rgb: 0x808080), - selectedIconColor: accentColor, - textColor: UIColor(rgb: 0x929292), - selectedTextColor: accentColor, - badgeBackgroundColor: UIColor(rgb: 0xffffff), - badgeStrokeColor: UIColor(rgb: 0x1c1c1d), - badgeTextColor: UIColor(rgb: 0x000000) -) + let rootStatusBar = PresentationThemeRootNavigationStatusBar( + style: .white + ) -private let rootNavigationBar = PresentationThemeRootNavigationBar( - buttonColor: accentColor, - disabledButtonColor: UIColor(rgb: 0x525252), - primaryTextColor: accentColor, - secondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), - controlColor: UIColor(rgb: 0x767677), - accentTextColor: accentColor, - backgroundColor: UIColor(rgb: 0x1c1c1d), - separatorColor: UIColor(rgb: 0x000000), - badgeBackgroundColor: UIColor(rgb: 0xffffff), - badgeStrokeColor: UIColor(rgb: 0x1c1c1d), - badgeTextColor: UIColor(rgb: 0x1c1c1d) -) + let rootTabBar = PresentationThemeRootTabBar( + backgroundColor: UIColor(rgb: 0x1c1c1d), + separatorColor: UIColor(rgb: 0x3d3d40), + iconColor: UIColor(rgb: 0x828282), + selectedIconColor: accentColor, + textColor: UIColor(rgb: 0x828282), + selectedTextColor: accentColor, + badgeBackgroundColor: UIColor(rgb: 0xeb5545), + badgeStrokeColor: UIColor(rgb: 0x1c1c1d), + badgeTextColor: UIColor(rgb: 0xffffff) + ) -private let activeNavigationSearchBar = PresentationThemeActiveNavigationSearchBar( - backgroundColor: UIColor(rgb: 0x1c1c1d), - accentColor: accentColor, - inputFillColor: UIColor(rgb: 0x272728), - inputTextColor: accentColor, - inputPlaceholderTextColor: UIColor(rgb: 0x5e5e5e), - inputIconColor: UIColor(rgb: 0x5e5e5e), - inputClearButtonColor: UIColor(rgb: 0x5e5e5e), - separatorColor: UIColor(rgb: 0x000000) -) + let rootNavigationBar = PresentationThemeRootNavigationBar( + buttonColor: accentColor, + disabledButtonColor: UIColor(rgb: 0x525252), + primaryTextColor: .white, + secondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), + controlColor: UIColor(rgb: 0x767676), + accentTextColor: accentColor, + backgroundColor: UIColor(rgb: 0x1c1c1d), + separatorColor: UIColor(rgb: 0x3d3d40), + badgeBackgroundColor: UIColor(rgb: 0xeb5545), + badgeStrokeColor: UIColor(rgb: 0x1c1c1d), + badgeTextColor: UIColor(rgb: 0xffffff) + ) -private let auth = PresentationThemeAuth( - introStartButton: accentColor, - introDotColor: UIColor(rgb: 0x5e5e5e) -) + let activeNavigationSearchBar = PresentationThemeActiveNavigationSearchBar( + backgroundColor: UIColor(rgb: 0x1c1c1d), + accentColor: accentColor, + inputFillColor: UIColor(rgb: 0x272728), + inputTextColor: accentColor, + inputPlaceholderTextColor: UIColor(rgb: 0x5e5e5e), + inputIconColor: UIColor(rgb: 0x5e5e5e), + inputClearButtonColor: UIColor(rgb: 0x5e5e5e), + separatorColor: UIColor(rgb: 0x3d3d40) + ) -private let passcode = PresentationThemePasscode( - backgroundColors: (UIColor(rgb: 0x000000), UIColor(rgb: 0x000000)), - buttonColor: UIColor(rgb: 0x1c1c1d) -) + let auth = PresentationThemeAuth( + introStartButton: accentColor, + introDotColor: UIColor(rgb: 0x5e5e5e) + ) -private let rootController = PresentationThemeRootController( - statusBar: rootStatusBar, - tabBar: rootTabBar, - navigationBar: rootNavigationBar, - activeNavigationSearchBar: activeNavigationSearchBar -) + let passcode = PresentationThemePasscode( + backgroundColors: (UIColor(rgb: 0x000000), UIColor(rgb: 0x000000)), + buttonColor: UIColor(rgb: 0x1c1c1d) + ) -private let switchColors = PresentationThemeSwitch( - frameColor: UIColor(rgb: 0x545454), - handleColor: UIColor(rgb: 0x121212), - contentColor: UIColor(rgb: 0xb2b2b2), - positiveColor: UIColor(rgb: 0x000000), - negativeColor: destructiveColor -) + let rootController = PresentationThemeRootController( + statusBar: rootStatusBar, + tabBar: rootTabBar, + navigationBar: rootNavigationBar, + activeNavigationSearchBar: activeNavigationSearchBar + ) -private let list = PresentationThemeList( - blocksBackgroundColor: UIColor(rgb: 0x000000), - plainBackgroundColor: UIColor(rgb: 0x000000), - itemPrimaryTextColor: UIColor(rgb: 0xffffff), - itemSecondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), - itemDisabledTextColor: UIColor(rgb: 0x4d4d4d), //!!! - itemAccentColor: accentColor, - itemHighlightedColor: UIColor(rgb: 0x28b772), - itemDestructiveColor: destructiveColor, - itemPlaceholderTextColor: UIColor(rgb: 0x4d4d4d), //!!! - itemBlocksBackgroundColor: UIColor(rgb: 0x1c1c1d), - itemHighlightedBackgroundColor: UIColor(rgb: 0x191919), - itemBlocksSeparatorColor: UIColor(rgb: 0x000000), - itemPlainSeparatorColor: UIColor(rgb: 0x252525), - disclosureArrowColor: UIColor(rgb: 0x545454), //!!! - sectionHeaderTextColor: UIColor(rgb: 0xffffff), - freeTextColor: UIColor(rgb: 0x8d8e93), - freeTextErrorColor: UIColor(rgb: 0xcf3030), //!!! - freeTextSuccessColor: UIColor(rgb: 0x30cf30), //!!! - freeMonoIcon: UIColor(rgb: 0x8d8e93), - itemSwitchColors: switchColors, - itemDisclosureActions: PresentationThemeItemDisclosureActions( - neutral1: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x666666), foregroundColor: .white), - neutral2: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xcd7800), foregroundColor: .white), - destructive: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xc70c0c), foregroundColor: .white), - constructive: PresentationThemeItemDisclosureAction(fillColor: constructiveColor, foregroundColor: .white), - accent: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x666666), foregroundColor: .white), - warning: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xcd7800), foregroundColor: .white), - inactive: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x666666), foregroundColor: .white) - ), - itemCheckColors: PresentationThemeCheck( - strokeColor: UIColor(rgb: 0xffffff, alpha: 0.5), - fillColor: accentColor, - foregroundColor: UIColor(rgb: 0x000000) - ), - controlSecondaryColor: UIColor(rgb: 0xffffff, alpha: 0.5), - freeInputField: PresentationInputFieldTheme( - backgroundColor: UIColor(rgb: 0xffffff, alpha: 0.5), - placeholderColor: UIColor(rgb: 0x4d4d4d), - primaryColor: .white, - controlColor: UIColor(rgb: 0x4d4d4d) - ), - mediaPlaceholderColor: UIColor(rgb: 0x1c1c1d), - scrollIndicatorColor: UIColor(white: 1.0, alpha: 0.3), - pageIndicatorInactiveColor: UIColor(white: 1.0, alpha: 0.3), - inputClearButtonColor: UIColor(rgb: 0x8B9197) -) + let switchColors = PresentationThemeSwitch( + frameColor: UIColor(rgb: 0x5a5a5e), + handleColor: UIColor(rgb: 0x121212), + contentColor: UIColor(rgb: 0xb2b2b2), + positiveColor: UIColor(rgb: 0x000000), + negativeColor: destructiveColor + ) -private let chatList = PresentationThemeChatList( - backgroundColor: UIColor(rgb: 0x000000), - itemSeparatorColor: UIColor(rgb: 0x252525), - itemBackgroundColor: UIColor(rgb: 0x000000), - pinnedItemBackgroundColor: UIColor(rgb: 0x1c1c1d), - itemHighlightedBackgroundColor: UIColor(rgb: 0x191919), - itemSelectedBackgroundColor: UIColor(rgb: 0x191919), - titleColor: UIColor(rgb: 0xffffff), - secretTitleColor: secretColor, //!!! - dateTextColor: UIColor(rgb: 0x8e8e93), - authorNameColor: UIColor(rgb: 0xffffff), - messageTextColor: UIColor(rgb: 0x8e8e93), - messageDraftTextColor: UIColor(rgb: 0xdd4b39), //!!! - checkmarkColor: UIColor(rgb: 0xffffff), - pendingIndicatorColor: UIColor(rgb: 0xffffff), //!!! - failedFillColor: destructiveColor, - failedForegroundColor: .white, - muteIconColor: UIColor(rgb: 0x8e8e93), //!!! - unreadBadgeActiveBackgroundColor: UIColor(rgb: 0xffffff), - unreadBadgeActiveTextColor: UIColor(rgb: 0x000000), - unreadBadgeInactiveBackgroundColor: UIColor(rgb: 0x666666), - unreadBadgeInactiveTextColor:UIColor(rgb: 0x000000), - pinnedBadgeColor: UIColor(rgb: 0x767677), - pinnedSearchBarColor: UIColor(rgb: 0x272728), - regularSearchBarColor: UIColor(rgb: 0x272728), //!!! - sectionHeaderFillColor: UIColor(rgb: 0x1C1C1D), - sectionHeaderTextColor: UIColor(rgb: 0xffffff), - searchBarKeyboardColor: .dark, - verifiedIconFillColor: accentColor, - verifiedIconForegroundColor: .white, - secretIconColor: secretColor, - pinnedArchiveAvatarColor: PresentationThemeArchiveAvatarColors(backgroundColors: (UIColor(rgb: 0x72d5fd), UIColor(rgb: 0x2a9ef1)), foregroundColor: .white), - unpinnedArchiveAvatarColor: PresentationThemeArchiveAvatarColors(backgroundColors: (UIColor(rgb: 0x666666), UIColor(rgb: 0x666666)), foregroundColor: .black), - onlineDotColor: UIColor(rgb: 0x4cc91f) -) + let list = PresentationThemeList( + blocksBackgroundColor: UIColor(rgb: 0x000000), + plainBackgroundColor: UIColor(rgb: 0x000000), + itemPrimaryTextColor: UIColor(rgb: 0xffffff), + itemSecondaryTextColor: UIColor(rgb: 0x8f8f8f), + itemDisabledTextColor: UIColor(rgb: 0x4d4d4d), + itemAccentColor: accentColor, + itemHighlightedColor: UIColor(rgb: 0x28b772), + itemDestructiveColor: destructiveColor, + itemPlaceholderTextColor: UIColor(rgb: 0x4d4d4d), + itemBlocksBackgroundColor: UIColor(rgb: 0x1c1c1d), + itemHighlightedBackgroundColor: UIColor(rgb: 0x313135), + itemBlocksSeparatorColor: UIColor(rgb: 0x3d3d40), + itemPlainSeparatorColor: UIColor(rgb: 0x3d3d40), + disclosureArrowColor: UIColor(rgb: 0x5a5a5e), + sectionHeaderTextColor: UIColor(rgb: 0xffffff), + freeTextColor: UIColor(rgb: 0x8d8e93), + freeTextErrorColor: UIColor(rgb: 0xcf3030), + freeTextSuccessColor: UIColor(rgb: 0x30cf30), + freeMonoIcon: UIColor(rgb: 0x8d8e93), + itemSwitchColors: switchColors, + itemDisclosureActions: PresentationThemeItemDisclosureActions( + neutral1: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x666666), foregroundColor: .white), + neutral2: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xcd7800), foregroundColor: .white), + destructive: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xc70c0c), foregroundColor: .white), + constructive: PresentationThemeItemDisclosureAction(fillColor: constructiveColor, foregroundColor: .white), + accent: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x666666), foregroundColor: .white), + warning: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0xcd7800), foregroundColor: .white), + inactive: PresentationThemeItemDisclosureAction(fillColor: UIColor(rgb: 0x666666), foregroundColor: .white) + ), + itemCheckColors: PresentationThemeCheck( + strokeColor: UIColor(rgb: 0xffffff, alpha: 0.5), + fillColor: accentColor, + foregroundColor: UIColor(rgb: 0x000000) + ), + controlSecondaryColor: UIColor(rgb: 0xffffff, alpha: 0.5), + freeInputField: PresentationInputFieldTheme( + backgroundColor: UIColor(rgb: 0xffffff, alpha: 0.5), + placeholderColor: UIColor(rgb: 0x4d4d4d), + primaryColor: .white, + controlColor: UIColor(rgb: 0x4d4d4d) + ), + mediaPlaceholderColor: UIColor(rgb: 0x1c1c1d), + scrollIndicatorColor: UIColor(white: 1.0, alpha: 0.3), + pageIndicatorInactiveColor: UIColor(white: 1.0, alpha: 0.3), + inputClearButtonColor: UIColor(rgb: 0x8B9197) + ) -private let bubble = PresentationThemeChatBubble( - incoming: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x1f1f1f), highlightedFill: UIColor(rgb: 0x2A2A2A), stroke: UIColor(rgb: 0x1f1f1f)), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x1f1f1f), highlightedFill: UIColor(rgb: 0x2A2A2A), stroke: UIColor(rgb: 0x1f1f1f))), - outgoing: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x313131), highlightedFill: UIColor(rgb: 0x464646), stroke: UIColor(rgb: 0x313131)), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x313131), highlightedFill: UIColor(rgb: 0x464646), stroke: UIColor(rgb: 0x313131))), - freeform: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x1f1f1f), highlightedFill: UIColor(rgb: 0x2A2A2A), stroke: UIColor(rgb: 0x1f1f1f)), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x1f1f1f), highlightedFill: UIColor(rgb: 0x2A2A2A), stroke: UIColor(rgb: 0x1f1f1f))), - incomingPrimaryTextColor: UIColor(rgb: 0xffffff), - incomingSecondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), - incomingLinkTextColor: accentColor, - incomingLinkHighlightColor: accentColor.withAlphaComponent(0.5), - incomingScamColor: destructiveColor, - outgoingPrimaryTextColor: UIColor(rgb: 0xffffff), - outgoingSecondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), - outgoingLinkTextColor: accentColor, - outgoingLinkHighlightColor: accentColor.withAlphaComponent(0.5), - outgoingScamColor: destructiveColor, - infoPrimaryTextColor: UIColor(rgb: 0xffffff), - infoLinkTextColor: accentColor, - incomingTextHighlightColor: UIColor(rgb: 0xffe438), - outgoingTextHighlightColor: UIColor(rgb: 0xffe438), - incomingAccentTextColor: UIColor(rgb: 0xffffff), - outgoingAccentTextColor: UIColor(rgb: 0xffffff), - incomingAccentControlColor: UIColor(rgb: 0xffffff), - outgoingAccentControlColor: UIColor(rgb: 0xffffff), - incomingMediaActiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.6), - outgoingMediaActiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.6), - incomingMediaInactiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.3), - outgoingMediaInactiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.3), - outgoingCheckColor: UIColor(rgb: 0xffffff, alpha: 0.5), - incomingPendingActivityColor: UIColor(rgb: 0xffffff, alpha: 0.5), - outgoingPendingActivityColor: UIColor(rgb: 0xffffff, alpha: 0.5), - mediaDateAndStatusFillColor: UIColor(white: 0.0, alpha: 0.5), - mediaDateAndStatusTextColor: .white, - incomingFileTitleColor: UIColor(rgb: 0xffffff), - outgoingFileTitleColor: UIColor(rgb: 0xffffff), - incomingFileDescriptionColor: UIColor(rgb: 0xffffff, alpha: 0.5), - outgoingFileDescriptionColor: UIColor(rgb: 0xffffff, alpha: 0.5), - incomingFileDurationColor: UIColor(rgb: 0xffffff, alpha: 0.5), - outgoingFileDurationColor: UIColor(rgb: 0xffffff, alpha: 0.5), - shareButtonFillColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0x000000, alpha: 0.5), withoutWallpaper: UIColor(rgb: 0x000000, alpha: 0.5)), - shareButtonStrokeColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0xb2b2b2, alpha: 0.18), withoutWallpaper: UIColor(rgb: 0xb2b2b2, alpha: 0.18)), - shareButtonForegroundColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0xb2b2b2), withoutWallpaper: UIColor(rgb: 0xb2b2b2)), //!!! - mediaOverlayControlBackgroundColor: UIColor(white: 0.0, alpha: 0.6), //!!! - mediaOverlayControlForegroundColor: UIColor(white: 1.0, alpha: 1.0), //!!! - actionButtonsIncomingFillColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0x000000, alpha: 0.5), withoutWallpaper: UIColor(rgb: 0x000000, alpha: 0.5)), - actionButtonsIncomingStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xb2b2b2, alpha: 0.18)), - actionButtonsIncomingTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)), - actionButtonsOutgoingFillColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0x000000, alpha: 0.5), withoutWallpaper: UIColor(rgb: 0x000000, alpha: 0.5)), - actionButtonsOutgoingStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xb2b2b2, alpha: 0.18)), - actionButtonsOutgoingTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)), - selectionControlBorderColor: .white, - selectionControlFillColor: accentColor, - selectionControlForegroundColor: .black, - mediaHighlightOverlayColor: UIColor(white: 1.0, alpha: 0.6), - deliveryFailedFillColor: destructiveColor, - deliveryFailedForegroundColor: .white, - incomingMediaPlaceholderColor: UIColor(rgb: 0x1f1f1f).mixedWith(.white, alpha: 0.05), - outgoingMediaPlaceholderColor: UIColor(rgb: 0x313131).mixedWith(.white, alpha: 0.05), - incomingPolls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0x737373), radioProgress: accentColor, highlight: accentColor.withAlphaComponent(0.12), separator: UIColor(rgb: 0x000000), bar: accentColor), - outgoingPolls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0x838383), radioProgress: accentColor, highlight: accentColor.withAlphaComponent(0.12), separator: UIColor(white: 0.3, alpha: 1.0), bar: accentColor) -) + let chatList = PresentationThemeChatList( + backgroundColor: UIColor(rgb: 0x000000), + itemSeparatorColor: UIColor(rgb: 0x3d3d40), + itemBackgroundColor: UIColor(rgb: 0x000000), + pinnedItemBackgroundColor: UIColor(rgb: 0x1c1c1d), + itemHighlightedBackgroundColor: UIColor(rgb: 0x191919), + itemSelectedBackgroundColor: UIColor(rgb: 0x191919), + titleColor: UIColor(rgb: 0xffffff), + secretTitleColor: secretColor, + dateTextColor: UIColor(rgb: 0x8e8e92), + authorNameColor: UIColor(rgb: 0xffffff), + messageTextColor: UIColor(rgb: 0x8e8e92), + messageDraftTextColor: UIColor(rgb: 0xdd4b39), + checkmarkColor: UIColor(rgb: 0xffffff), + pendingIndicatorColor: UIColor(rgb: 0xffffff), + failedFillColor: destructiveColor, + failedForegroundColor: .white, + muteIconColor: UIColor(rgb: 0x8e8e92), + unreadBadgeActiveBackgroundColor: UIColor(rgb: 0xffffff), + unreadBadgeActiveTextColor: UIColor(rgb: 0x000000), + unreadBadgeInactiveBackgroundColor: UIColor(rgb: 0x666666), + unreadBadgeInactiveTextColor:UIColor(rgb: 0x000000), + pinnedBadgeColor: UIColor(rgb: 0x767677), + pinnedSearchBarColor: UIColor(rgb: 0x272728), + regularSearchBarColor: UIColor(rgb: 0x272728), + sectionHeaderFillColor: UIColor(rgb: 0x1C1C1D), + sectionHeaderTextColor: UIColor(rgb: 0xffffff), + searchBarKeyboardColor: .dark, + verifiedIconFillColor: accentColor, + verifiedIconForegroundColor: .white, + secretIconColor: secretColor, + pinnedArchiveAvatarColor: PresentationThemeArchiveAvatarColors(backgroundColors: (UIColor(rgb: 0x72d5fd), UIColor(rgb: 0x2a9ef1)), foregroundColor: .white), + unpinnedArchiveAvatarColor: PresentationThemeArchiveAvatarColors(backgroundColors: (UIColor(rgb: 0x666666), UIColor(rgb: 0x666666)), foregroundColor: .black), + onlineDotColor: UIColor(rgb: 0x4cc91f) + ) -private let serviceMessage = PresentationThemeServiceMessage( - components: PresentationThemeServiceMessageColor(withDefaultWallpaper: PresentationThemeServiceMessageColorComponents(fill: UIColor(rgb: 0x1f1f1f, alpha: 1.0), primaryText: UIColor(rgb: 0xffffff), linkHighlight: UIColor(rgb: 0xffffff, alpha: 0.12), scam: destructiveColor, dateFillStatic: UIColor(rgb: 0x1f1f1f, alpha: 1.0), dateFillFloating: UIColor(rgb: 0xffffff, alpha: 0.2)), withCustomWallpaper: PresentationThemeServiceMessageColorComponents(fill: UIColor(rgb: 0x1f1f1f, alpha: 1.0), primaryText: .white, linkHighlight: UIColor(rgb: 0xffffff, alpha: 0.12), scam: destructiveColor, dateFillStatic: UIColor(rgb: 0x1f1f1f, alpha: 1.0), dateFillFloating: UIColor(rgb: 0xffffff, alpha: 0.2))), - unreadBarFillColor: UIColor(rgb: 0x1b1b1b), //!!! - unreadBarStrokeColor: UIColor(rgb: 0x000000), - unreadBarTextColor: UIColor(rgb: 0xb2b2b2), //!!! - dateTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xb2b2b2)) -) + let bubble = PresentationThemeChatBubble( + incoming: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x262628), highlightedFill: UIColor(rgb: 0x353539), stroke: UIColor(rgb: 0x262628)), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x262628), highlightedFill: UIColor(rgb: 0x353539), stroke: UIColor(rgb: 0x262628))), + outgoing: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: accentColor, highlightedFill: accentColor.withMultipliedBrightnessBy(1.421), stroke: accentColor), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: accentColor, highlightedFill: accentColor.withMultipliedBrightnessBy(1.421), stroke: accentColor)), + freeform: PresentationThemeBubbleColor(withWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x1f1f1f), highlightedFill: UIColor(rgb: 0x2A2A2A), stroke: UIColor(rgb: 0x1f1f1f)), withoutWallpaper: PresentationThemeBubbleColorComponents(fill: UIColor(rgb: 0x1f1f1f), highlightedFill: UIColor(rgb: 0x2A2A2A), stroke: UIColor(rgb: 0x1f1f1f))), + incomingPrimaryTextColor: UIColor(rgb: 0xffffff), + incomingSecondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), + incomingLinkTextColor: accentColor, + incomingLinkHighlightColor: accentColor.withAlphaComponent(0.5), + incomingScamColor: destructiveColor, + outgoingPrimaryTextColor: UIColor(rgb: 0xffffff), + outgoingSecondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), + outgoingLinkTextColor: accentColor, + outgoingLinkHighlightColor: accentColor.withAlphaComponent(0.5), + outgoingScamColor: destructiveColor, + infoPrimaryTextColor: UIColor(rgb: 0xffffff), + infoLinkTextColor: accentColor, + incomingTextHighlightColor: UIColor(rgb: 0xffe438), + outgoingTextHighlightColor: UIColor(rgb: 0xffe438), + incomingAccentTextColor: UIColor(rgb: 0xffffff), + outgoingAccentTextColor: UIColor(rgb: 0xffffff), + incomingAccentControlColor: UIColor(rgb: 0xffffff), + outgoingAccentControlColor: UIColor(rgb: 0xffffff), + incomingMediaActiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.6), + outgoingMediaActiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.6), + incomingMediaInactiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.3), + outgoingMediaInactiveControlColor: UIColor(rgb: 0xffffff, alpha: 0.3), + outgoingCheckColor: UIColor(rgb: 0xffffff, alpha: 0.5), + incomingPendingActivityColor: UIColor(rgb: 0xffffff, alpha: 0.5), + outgoingPendingActivityColor: UIColor(rgb: 0xffffff, alpha: 0.5), + mediaDateAndStatusFillColor: UIColor(white: 0.0, alpha: 0.5), + mediaDateAndStatusTextColor: .white, + incomingFileTitleColor: UIColor(rgb: 0xffffff), + outgoingFileTitleColor: UIColor(rgb: 0xffffff), + incomingFileDescriptionColor: UIColor(rgb: 0xffffff, alpha: 0.5), + outgoingFileDescriptionColor: UIColor(rgb: 0xffffff, alpha: 0.5), + incomingFileDurationColor: UIColor(rgb: 0xffffff, alpha: 0.5), + outgoingFileDurationColor: UIColor(rgb: 0xffffff, alpha: 0.5), + shareButtonFillColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0x000000, alpha: 0.5), withoutWallpaper: UIColor(rgb: 0x000000, alpha: 0.5)), + shareButtonStrokeColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0xb2b2b2, alpha: 0.18), withoutWallpaper: UIColor(rgb: 0xb2b2b2, alpha: 0.18)), + shareButtonForegroundColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0xb2b2b2), withoutWallpaper: UIColor(rgb: 0xb2b2b2)), + mediaOverlayControlBackgroundColor: UIColor(white: 0.0, alpha: 0.6), + mediaOverlayControlForegroundColor: UIColor(white: 1.0, alpha: 1.0), + actionButtonsIncomingFillColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0x000000, alpha: 0.5), withoutWallpaper: UIColor(rgb: 0x000000, alpha: 0.5)), + actionButtonsIncomingStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xb2b2b2, alpha: 0.18)), + actionButtonsIncomingTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)), + actionButtonsOutgoingFillColor: PresentationThemeVariableColor(withWallpaper: UIColor(rgb: 0x000000, alpha: 0.5), withoutWallpaper: UIColor(rgb: 0x000000, alpha: 0.5)), + actionButtonsOutgoingStrokeColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xb2b2b2, alpha: 0.18)), + actionButtonsOutgoingTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)), + selectionControlBorderColor: .white, + selectionControlFillColor: accentColor, + selectionControlForegroundColor: .black, + mediaHighlightOverlayColor: UIColor(white: 1.0, alpha: 0.6), + deliveryFailedFillColor: destructiveColor, + deliveryFailedForegroundColor: .white, + incomingMediaPlaceholderColor: UIColor(rgb: 0x1f1f1f).mixedWith(.white, alpha: 0.05), + outgoingMediaPlaceholderColor: UIColor(rgb: 0x313131).mixedWith(.white, alpha: 0.05), + incomingPolls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0x737373), radioProgress: accentColor, highlight: accentColor.withAlphaComponent(0.12), separator: UIColor(rgb: 0x000000), bar: accentColor), + outgoingPolls: PresentationThemeChatBubblePolls(radioButton: UIColor(rgb: 0x838383), radioProgress: accentColor, highlight: accentColor.withAlphaComponent(0.12), separator: UIColor(white: 0.3, alpha: 1.0), bar: accentColor) + ) -private let inputPanelMediaRecordingControl = PresentationThemeChatInputPanelMediaRecordingControl( - buttonColor: accentColor, - micLevelColor: accentColor.withAlphaComponent(0.2), - activeIconColor: .black, - panelControlFillColor: UIColor(rgb: 0x1C1C1D), - panelControlStrokeColor: UIColor(rgb: 0x1C1C1D), - panelControlContentPrimaryColor: UIColor(rgb: 0x9597a0), //!!! - panelControlContentAccentColor: accentColor -) + let serviceMessage = PresentationThemeServiceMessage( + components: PresentationThemeServiceMessageColor(withDefaultWallpaper: PresentationThemeServiceMessageColorComponents(fill: UIColor(rgb: 0x1f1f1f, alpha: 1.0), primaryText: UIColor(rgb: 0xffffff), linkHighlight: UIColor(rgb: 0xffffff, alpha: 0.12), scam: destructiveColor, dateFillStatic: UIColor(rgb: 0x1f1f1f, alpha: 1.0), dateFillFloating: UIColor(rgb: 0xffffff, alpha: 0.2)), withCustomWallpaper: PresentationThemeServiceMessageColorComponents(fill: UIColor(rgb: 0x1f1f1f, alpha: 1.0), primaryText: .white, linkHighlight: UIColor(rgb: 0xffffff, alpha: 0.12), scam: destructiveColor, dateFillStatic: UIColor(rgb: 0x1f1f1f, alpha: 1.0), dateFillFloating: UIColor(rgb: 0xffffff, alpha: 0.2))), + unreadBarFillColor: UIColor(rgb: 0x1b1b1b), + unreadBarStrokeColor: UIColor(rgb: 0x000000), + unreadBarTextColor: UIColor(rgb: 0xb2b2b2), + dateTextColor: PresentationThemeVariableColor(color: UIColor(rgb: 0xffffff)) + ) -private let inputPanel = PresentationThemeChatInputPanel( - panelBackgroundColor: UIColor(rgb: 0x1c1c1d), - panelStrokeColor: UIColor(rgb: 0x000000), - panelControlAccentColor: accentColor, - panelControlColor: UIColor(rgb: 0x808080), - panelControlDisabledColor: UIColor(rgb: 0x808080, alpha: 0.5), //!!! - panelControlDestructiveColor: UIColor(rgb: 0xff3b30), //!!! - inputBackgroundColor: UIColor(rgb: 0x060606), - inputStrokeColor: UIColor(rgb: 0x060606), - inputPlaceholderColor: UIColor(rgb: 0x7b7b7b), - inputTextColor: UIColor(rgb: 0xffffff), - inputControlColor: UIColor(rgb: 0x7b7b7b), - actionControlFillColor: accentColor, - actionControlForegroundColor: .black, - primaryTextColor: UIColor(rgb: 0xffffff), - secondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), - mediaRecordingDotColor: .white, - keyboardColor: .dark, - mediaRecordingControl: inputPanelMediaRecordingControl -) + let inputPanelMediaRecordingControl = PresentationThemeChatInputPanelMediaRecordingControl( + buttonColor: accentColor, + micLevelColor: accentColor.withAlphaComponent(0.2), + activeIconColor: .black, + panelControlFillColor: UIColor(rgb: 0x1C1C1D), + panelControlStrokeColor: UIColor(rgb: 0x1C1C1D), + panelControlContentPrimaryColor: UIColor(rgb: 0x9597a0), + panelControlContentAccentColor: accentColor + ) -private let inputMediaPanel = PresentationThemeInputMediaPanel( - panelSeparatorColor: UIColor(rgb: 0x000000), - panelIconColor: UIColor(rgb: 0x808080), - panelHighlightedIconBackgroundColor: UIColor(rgb: 0x000000), //!!! - stickersBackgroundColor: UIColor(rgb: 0x000000), - stickersSectionTextColor: UIColor(rgb: 0x7b7b7b), - stickersSearchBackgroundColor: UIColor(rgb: 0x1c1c1d), - stickersSearchPlaceholderColor: UIColor(rgb: 0x8e8e93), - stickersSearchPrimaryColor: .white, - stickersSearchControlColor: UIColor(rgb: 0x8e8e93), - gifsBackgroundColor: UIColor(rgb: 0x000000) -) + let inputPanel = PresentationThemeChatInputPanel( + panelBackgroundColor: UIColor(rgb: 0x1c1c1d), + panelStrokeColor: UIColor(rgb: 0x000000), + panelControlAccentColor: accentColor, + panelControlColor: UIColor(rgb: 0x808080), + panelControlDisabledColor: UIColor(rgb: 0x808080, alpha: 0.5), + panelControlDestructiveColor: UIColor(rgb: 0xff3b30), + inputBackgroundColor: UIColor(rgb: 0x060606), + inputStrokeColor: UIColor(rgb: 0x060606), + inputPlaceholderColor: UIColor(rgb: 0x7b7b7b), + inputTextColor: UIColor(rgb: 0xffffff), + inputControlColor: UIColor(rgb: 0x7b7b7b), + actionControlFillColor: accentColor, + actionControlForegroundColor: .black, + primaryTextColor: UIColor(rgb: 0xffffff), + secondaryTextColor: UIColor(rgb: 0xffffff, alpha: 0.5), + mediaRecordingDotColor: .white, + keyboardColor: .dark, + mediaRecordingControl: inputPanelMediaRecordingControl + ) -private let inputButtonPanel = PresentationThemeInputButtonPanel( - panelSeparatorColor: UIColor(rgb: 0x000000), - panelBackgroundColor: UIColor(rgb: 0x141414), - buttonFillColor: UIColor(rgb: 0x5A5A5A), - buttonStrokeColor: UIColor(rgb: 0x0C0C0C), - buttonHighlightedFillColor: UIColor(rgb: 0x5A5A5A, alpha: 0.7), - buttonHighlightedStrokeColor: UIColor(rgb: 0x0C0C0C), - buttonTextColor: UIColor(rgb: 0xffffff) -) + let inputMediaPanel = PresentationThemeInputMediaPanel( + panelSeparatorColor: UIColor(rgb: 0x3d3d40), + panelIconColor: UIColor(rgb: 0x808080), + panelHighlightedIconBackgroundColor: UIColor(rgb: 0x000000), + stickersBackgroundColor: UIColor(rgb: 0x000000), + stickersSectionTextColor: UIColor(rgb: 0x7b7b7b), + stickersSearchBackgroundColor: UIColor(rgb: 0x1c1c1d), + stickersSearchPlaceholderColor: UIColor(rgb: 0x8e8e92), + stickersSearchPrimaryColor: .white, + stickersSearchControlColor: UIColor(rgb: 0x8e8e92), + gifsBackgroundColor: UIColor(rgb: 0x000000) + ) -private let historyNavigation = PresentationThemeChatHistoryNavigation( - fillColor: UIColor(rgb: 0x1C1C1D), - strokeColor: UIColor(rgb: 0x000000), - foregroundColor: UIColor(rgb: 0xffffff), - badgeBackgroundColor: accentColor, - badgeStrokeColor: .black, - badgeTextColor: .black -) + let inputButtonPanel = PresentationThemeInputButtonPanel( + panelSeparatorColor: UIColor(rgb: 0x3d3d40), + panelBackgroundColor: UIColor(rgb: 0x141414), + buttonFillColor: UIColor(rgb: 0x5A5A5A), + buttonStrokeColor: UIColor(rgb: 0x0C0C0C), + buttonHighlightedFillColor: UIColor(rgb: 0x5A5A5A, alpha: 0.7), + buttonHighlightedStrokeColor: UIColor(rgb: 0x0C0C0C), + buttonTextColor: UIColor(rgb: 0xffffff) + ) -private let chat = PresentationThemeChat( - bubble: bubble, - serviceMessage: serviceMessage, - inputPanel: inputPanel, - inputMediaPanel: inputMediaPanel, - inputButtonPanel: inputButtonPanel, - historyNavigation: historyNavigation -) + let historyNavigation = PresentationThemeChatHistoryNavigation( + fillColor: UIColor(rgb: 0x1C1C1D), + strokeColor: UIColor(rgb: 0x000000), + foregroundColor: UIColor(rgb: 0xffffff), + badgeBackgroundColor: accentColor, + badgeStrokeColor: .black, + badgeTextColor: .black + ) -private let actionSheet = PresentationThemeActionSheet( - dimColor: UIColor(white: 0.0, alpha: 0.5), - backgroundType: .dark, - opaqueItemBackgroundColor: UIColor(rgb: 0x1c1c1d), - itemBackgroundColor: UIColor(rgb: 0x1c1c1d, alpha: 0.8), - opaqueItemHighlightedBackgroundColor: UIColor(white: 0.0, alpha: 1.0), - itemHighlightedBackgroundColor: UIColor(rgb: 0x000000, alpha: 0.5), //!!! - standardActionTextColor: accentColor, - opaqueItemSeparatorColor: UIColor(white: 0.0, alpha: 1.0), - destructiveActionTextColor: destructiveColor, - disabledActionTextColor: UIColor(rgb: 0x4d4d4d), //!!! - primaryTextColor: .white, - secondaryTextColor: UIColor(rgb: 0x5e5e5e), //!!! - controlAccentColor: accentColor, - inputBackgroundColor: UIColor(rgb: 0x545454), //!!! - inputHollowBackgroundColor: UIColor(rgb: 0x545454), - inputBorderColor: UIColor(rgb: 0x545454), - inputPlaceholderColor: UIColor(rgb: 0xaaaaaa), //!!! - inputTextColor: .white, - inputClearButtonColor: UIColor(rgb: 0xaaaaaa), - checkContentColor: .black -) + let chat = PresentationThemeChat( + bubble: bubble, + serviceMessage: serviceMessage, + inputPanel: inputPanel, + inputMediaPanel: inputMediaPanel, + inputButtonPanel: inputButtonPanel, + historyNavigation: historyNavigation + ) -private let inAppNotification = PresentationThemeInAppNotification( - fillColor: UIColor(rgb: 0x1c1c1d), - primaryTextColor: .white, - expandedNotification: PresentationThemeExpandedNotification( + let actionSheet = PresentationThemeActionSheet( + dimColor: UIColor(white: 0.0, alpha: 0.5), backgroundType: .dark, - navigationBar: PresentationThemeExpandedNotificationNavigationBar( - backgroundColor: UIColor(rgb: 0x1c1c1d), - primaryTextColor: accentColor, - controlColor: accentColor, - separatorColor: UIColor(rgb: 0x000000) + opaqueItemBackgroundColor: UIColor(rgb: 0x1c1c1d), + itemBackgroundColor: UIColor(rgb: 0x1c1c1d, alpha: 0.8), + opaqueItemHighlightedBackgroundColor: UIColor(white: 0.0, alpha: 1.0), + itemHighlightedBackgroundColor: UIColor(rgb: 0x000000, alpha: 0.5), + standardActionTextColor: accentColor, + opaqueItemSeparatorColor: UIColor(rgb: 0x3d3d40), + destructiveActionTextColor: destructiveColor, + disabledActionTextColor: UIColor(rgb: 0x4d4d4d), + primaryTextColor: .white, + secondaryTextColor: UIColor(rgb: 0x5e5e5e), + controlAccentColor: accentColor, + inputBackgroundColor: UIColor(rgb: 0x5a5a5e), + inputHollowBackgroundColor: UIColor(rgb: 0x5a5a5e), + inputBorderColor: UIColor(rgb: 0x5a5a5e), + inputPlaceholderColor: UIColor(rgb: 0xaaaaaa), + inputTextColor: .white, + inputClearButtonColor: UIColor(rgb: 0xaaaaaa), + checkContentColor: .black + ) + + let inAppNotification = PresentationThemeInAppNotification( + fillColor: UIColor(rgb: 0x1c1c1d), + primaryTextColor: .white, + expandedNotification: PresentationThemeExpandedNotification( + backgroundType: .dark, + navigationBar: PresentationThemeExpandedNotificationNavigationBar( + backgroundColor: UIColor(rgb: 0x1c1c1d), + primaryTextColor: accentColor, + controlColor: accentColor, + separatorColor: UIColor(rgb: 0x000000) + ) ) ) -) -public let defaultDarkPresentationTheme = PresentationTheme( - name: .builtin(.nightGrayscale), - overallDarkAppearance: true, - allowsCustomWallpapers: false, - auth: auth, - passcode: passcode, - rootController: rootController, - list: list, - chatList: chatList, - chat: chat, - actionSheet: actionSheet, - inAppNotification: inAppNotification -) + return PresentationTheme( + name: .builtin(.nightGrayscale), + overallDarkAppearance: true, + auth: auth, + passcode: passcode, + rootController: rootController, + list: list, + chatList: chatList, + chat: chat, + actionSheet: actionSheet, + inAppNotification: inAppNotification + ) +} + +public let defaultDarkPresentationTheme = makeDarkPresentationTheme(accentColor: 0x2EA6FF) + +public func makeDarkPresentationTheme(accentColor: Int32?) -> PresentationTheme { + let color: UIColor + if let accentColor = accentColor { + color = UIColor(rgb: UInt32(bitPattern: accentColor)) + } else { + color = UIColor(rgb: UInt32(bitPattern: defaultDayAccentColor)) + } + return makeDarkPresentationTheme(accentColor: color) +} + diff --git a/submodules/TelegramPresentationData/Sources/DefaultPresentationTheme.swift b/submodules/TelegramPresentationData/Sources/DefaultPresentationTheme.swift index f711b1764d..8bb28d47df 100644 --- a/submodules/TelegramPresentationData/Sources/DefaultPresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/DefaultPresentationTheme.swift @@ -449,7 +449,6 @@ private func makeDefaultPresentationTheme(accentColor: UIColor, serviceBackgroun return PresentationTheme( name: .builtin(day ? .day : .dayClassic), overallDarkAppearance: false, - allowsCustomWallpapers: true, auth: auth, passcode: passcode, rootController: rootController, diff --git a/submodules/TelegramPresentationData/Sources/PresentationData.swift b/submodules/TelegramPresentationData/Sources/PresentationData.swift index 4d87418c76..443badff17 100644 --- a/submodules/TelegramPresentationData/Sources/PresentationData.swift +++ b/submodules/TelegramPresentationData/Sources/PresentationData.swift @@ -279,9 +279,9 @@ public func currentPresentationDataAndSettings(accountManager: AccountManager) - case .dayClassic: themeValue = defaultPresentationTheme case .nightGrayscale: - themeValue = defaultDarkPresentationTheme + themeValue = makeDarkPresentationTheme(accentColor: effectiveAccentColor) case .nightAccent: - themeValue = defaultDarkAccentPresentationTheme + themeValue = makeDarkAccentPresentationTheme(accentColor: effectiveAccentColor) case .day: themeValue = makeDefaultDayPresentationTheme(accentColor: effectiveAccentColor, serviceBackgroundColor: defaultServiceBackgroundColor) } @@ -561,9 +561,9 @@ public func updatedPresentationData(accountManager: AccountManager, applicationI case .dayClassic: themeValue = makeDefaultPresentationTheme(serviceBackgroundColor: serviceBackgroundColor) case .nightGrayscale: - themeValue = defaultDarkPresentationTheme + themeValue = makeDarkPresentationTheme(accentColor: effectiveAccentColor) case .nightAccent: - themeValue = defaultDarkAccentPresentationTheme + themeValue = makeDarkAccentPresentationTheme(accentColor: effectiveAccentColor) case .day: themeValue = makeDefaultDayPresentationTheme(accentColor: effectiveAccentColor, serviceBackgroundColor: serviceBackgroundColor) } diff --git a/submodules/TelegramPresentationData/Sources/PresentationStrings.swift b/submodules/TelegramPresentationData/Sources/PresentationStrings.swift index 616fba47bd..3e19a2e12f 100644 --- a/submodules/TelegramPresentationData/Sources/PresentationStrings.swift +++ b/submodules/TelegramPresentationData/Sources/PresentationStrings.swift @@ -3636,814 +3636,816 @@ public final class PresentationStrings { public var Common_Cancel: String { return self._s[3221]! } public var DialogList_SavedMessagesTooltip: String { return self._s[3222]! } public var TwoStepAuth_SetupPasswordTitle: String { return self._s[3223]! } + public var Appearance_TintAllColors: String { return self._s[3224]! } public func PUSH_MESSAGE_FWD(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3224]!, self._r[3224]!, [_1]) + return formatWithArgumentRanges(self._s[3225]!, self._r[3225]!, [_1]) } - public var Conversation_ReportSpamConfirmation: String { return self._s[3225]! } - public var ChatSettings_Title: String { return self._s[3227]! } - public var Passport_PasswordReset: String { return self._s[3228]! } - public var SocksProxySetup_TypeNone: String { return self._s[3229]! } - public var PhoneNumberHelp_Help: String { return self._s[3231]! } - public var Checkout_EnterPassword: String { return self._s[3232]! } - public var Share_AuthTitle: String { return self._s[3234]! } - public var Activity_UploadingDocument: String { return self._s[3235]! } - public var State_Connecting: String { return self._s[3236]! } - public var Profile_MessageLifetime1w: String { return self._s[3237]! } - public var Conversation_ContextMenuReport: String { return self._s[3238]! } - public var CheckoutInfo_ReceiverInfoPhone: String { return self._s[3239]! } - public var AutoNightTheme_ScheduledTo: String { return self._s[3240]! } - public var AuthSessions_Terminate: String { return self._s[3241]! } - public var Checkout_NewCard_CardholderNamePlaceholder: String { return self._s[3242]! } - public var KeyCommand_JumpToPreviousUnreadChat: String { return self._s[3243]! } - public var PhotoEditor_Set: String { return self._s[3244]! } - public var EmptyGroupInfo_Title: String { return self._s[3245]! } - public var Login_PadPhoneHelp: String { return self._s[3246]! } - public var AutoDownloadSettings_TypeGroupChats: String { return self._s[3248]! } - public var PrivacyPolicy_DeclineLastWarning: String { return self._s[3250]! } - public var NotificationsSound_Complete: String { return self._s[3251]! } - public var SettingsSearch_Synonyms_Privacy_Data_Title: String { return self._s[3252]! } - public var Group_Info_AdminLog: String { return self._s[3253]! } - public var GroupPermission_NotAvailableInPublicGroups: String { return self._s[3254]! } - public var Channel_AdminLog_InfoPanelAlertText: String { return self._s[3255]! } - public var Conversation_Admin: String { return self._s[3257]! } - public var Conversation_GifTooltip: String { return self._s[3258]! } - public var Passport_NotLoggedInMessage: String { return self._s[3259]! } + public var Conversation_ReportSpamConfirmation: String { return self._s[3226]! } + public var ChatSettings_Title: String { return self._s[3228]! } + public var Passport_PasswordReset: String { return self._s[3229]! } + public var SocksProxySetup_TypeNone: String { return self._s[3230]! } + public var PhoneNumberHelp_Help: String { return self._s[3232]! } + public var Checkout_EnterPassword: String { return self._s[3233]! } + public var Share_AuthTitle: String { return self._s[3235]! } + public var Activity_UploadingDocument: String { return self._s[3236]! } + public var State_Connecting: String { return self._s[3237]! } + public var Profile_MessageLifetime1w: String { return self._s[3238]! } + public var Conversation_ContextMenuReport: String { return self._s[3239]! } + public var CheckoutInfo_ReceiverInfoPhone: String { return self._s[3240]! } + public var AutoNightTheme_ScheduledTo: String { return self._s[3241]! } + public var AuthSessions_Terminate: String { return self._s[3242]! } + public var Checkout_NewCard_CardholderNamePlaceholder: String { return self._s[3243]! } + public var KeyCommand_JumpToPreviousUnreadChat: String { return self._s[3244]! } + public var PhotoEditor_Set: String { return self._s[3245]! } + public var EmptyGroupInfo_Title: String { return self._s[3246]! } + public var Login_PadPhoneHelp: String { return self._s[3247]! } + public var AutoDownloadSettings_TypeGroupChats: String { return self._s[3249]! } + public var PrivacyPolicy_DeclineLastWarning: String { return self._s[3251]! } + public var NotificationsSound_Complete: String { return self._s[3252]! } + public var SettingsSearch_Synonyms_Privacy_Data_Title: String { return self._s[3253]! } + public var Group_Info_AdminLog: String { return self._s[3254]! } + public var GroupPermission_NotAvailableInPublicGroups: String { return self._s[3255]! } + public var Channel_AdminLog_InfoPanelAlertText: String { return self._s[3256]! } + public var Conversation_Admin: String { return self._s[3258]! } + public var Conversation_GifTooltip: String { return self._s[3259]! } + public var Passport_NotLoggedInMessage: String { return self._s[3260]! } public func AutoDownloadSettings_OnFor(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3260]!, self._r[3260]!, [_0]) + return formatWithArgumentRanges(self._s[3261]!, self._r[3261]!, [_0]) } - public var Profile_MessageLifetimeForever: String { return self._s[3261]! } - public var SharedMedia_EmptyTitle: String { return self._s[3263]! } - public var Channel_Edit_PrivatePublicLinkAlert: String { return self._s[3265]! } - public var Username_Help: String { return self._s[3266]! } - public var DialogList_LanguageTooltip: String { return self._s[3268]! } - public var Map_LoadError: String { return self._s[3269]! } - public var Login_PhoneNumberAlreadyAuthorized: String { return self._s[3270]! } - public var Channel_AdminLog_AddMembers: String { return self._s[3271]! } - public var ArchivedChats_IntroTitle2: String { return self._s[3272]! } - public var Notification_Exceptions_NewException: String { return self._s[3273]! } - public var TwoStepAuth_EmailTitle: String { return self._s[3274]! } - public var WatchRemote_AlertText: String { return self._s[3275]! } - public var ChatSettings_ConnectionType_Title: String { return self._s[3278]! } + public var Profile_MessageLifetimeForever: String { return self._s[3262]! } + public var SharedMedia_EmptyTitle: String { return self._s[3264]! } + public var Channel_Edit_PrivatePublicLinkAlert: String { return self._s[3266]! } + public var Username_Help: String { return self._s[3267]! } + public var DialogList_LanguageTooltip: String { return self._s[3269]! } + public var Map_LoadError: String { return self._s[3270]! } + public var Login_PhoneNumberAlreadyAuthorized: String { return self._s[3271]! } + public var Channel_AdminLog_AddMembers: String { return self._s[3272]! } + public var ArchivedChats_IntroTitle2: String { return self._s[3273]! } + public var Notification_Exceptions_NewException: String { return self._s[3274]! } + public var TwoStepAuth_EmailTitle: String { return self._s[3275]! } + public var WatchRemote_AlertText: String { return self._s[3276]! } + public var ChatSettings_ConnectionType_Title: String { return self._s[3279]! } public func Settings_CheckPhoneNumberTitle(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3279]!, self._r[3279]!, [_0]) + return formatWithArgumentRanges(self._s[3280]!, self._r[3280]!, [_0]) } - public var SettingsSearch_Synonyms_Calls_CallTab: String { return self._s[3280]! } - public var Passport_Address_CountryPlaceholder: String { return self._s[3281]! } + public var SettingsSearch_Synonyms_Calls_CallTab: String { return self._s[3281]! } + public var Passport_Address_CountryPlaceholder: String { return self._s[3282]! } public func DialogList_AwaitingEncryption(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3282]!, self._r[3282]!, [_0]) + return formatWithArgumentRanges(self._s[3283]!, self._r[3283]!, [_0]) } public func Time_PreciseDate_m6(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3283]!, self._r[3283]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[3284]!, self._r[3284]!, [_1, _2, _3]) } - public var Group_AdminLog_EmptyText: String { return self._s[3284]! } - public var SettingsSearch_Synonyms_Appearance_Title: String { return self._s[3285]! } - public var Conversation_PrivateChannelTooltip: String { return self._s[3287]! } - public var ChatList_UndoArchiveText1: String { return self._s[3288]! } - public var AccessDenied_VideoMicrophone: String { return self._s[3289]! } - public var Conversation_ContextMenuStickerPackAdd: String { return self._s[3290]! } - public var Cache_ClearNone: String { return self._s[3291]! } - public var SocksProxySetup_FailedToConnect: String { return self._s[3292]! } - public var Permissions_NotificationsTitle_v0: String { return self._s[3293]! } + public var Group_AdminLog_EmptyText: String { return self._s[3285]! } + public var SettingsSearch_Synonyms_Appearance_Title: String { return self._s[3286]! } + public var Conversation_PrivateChannelTooltip: String { return self._s[3288]! } + public var ChatList_UndoArchiveText1: String { return self._s[3289]! } + public var AccessDenied_VideoMicrophone: String { return self._s[3290]! } + public var Conversation_ContextMenuStickerPackAdd: String { return self._s[3291]! } + public var Cache_ClearNone: String { return self._s[3292]! } + public var SocksProxySetup_FailedToConnect: String { return self._s[3293]! } + public var Permissions_NotificationsTitle_v0: String { return self._s[3294]! } public func Channel_AdminLog_MessageEdited(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3294]!, self._r[3294]!, [_0]) + return formatWithArgumentRanges(self._s[3295]!, self._r[3295]!, [_0]) } - public var Passport_Identity_Country: String { return self._s[3295]! } + public var Passport_Identity_Country: String { return self._s[3296]! } public func ChatSettings_AutoDownloadSettings_TypeFile(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3296]!, self._r[3296]!, [_0]) - } - public func Notification_CreatedChat(_ _0: String) -> (String, [(Int, NSRange)]) { return formatWithArgumentRanges(self._s[3297]!, self._r[3297]!, [_0]) } - public var Exceptions_AddToExceptions: String { return self._s[3298]! } - public var AccessDenied_Settings: String { return self._s[3299]! } - public var Passport_Address_TypeUtilityBillUploadScan: String { return self._s[3300]! } - public var Month_ShortMay: String { return self._s[3301]! } - public var Compose_NewGroup: String { return self._s[3302]! } - public var Group_Setup_TypePrivate: String { return self._s[3304]! } - public var Login_PadPhoneHelpTitle: String { return self._s[3306]! } - public var Appearance_ThemeDayClassic: String { return self._s[3307]! } - public var Channel_AdminLog_MessagePreviousCaption: String { return self._s[3308]! } - public var AutoDownloadSettings_OffForAll: String { return self._s[3309]! } - public var Privacy_GroupsAndChannels_WhoCanAddMe: String { return self._s[3310]! } - public var Conversation_typing: String { return self._s[3312]! } - public var Paint_Masks: String { return self._s[3313]! } - public var Username_InvalidTaken: String { return self._s[3314]! } - public var Call_StatusNoAnswer: String { return self._s[3315]! } - public var TwoStepAuth_EmailAddSuccess: String { return self._s[3316]! } - public var SettingsSearch_Synonyms_Privacy_BlockedUsers: String { return self._s[3317]! } - public var Passport_Identity_Selfie: String { return self._s[3318]! } - public var Login_InfoLastNamePlaceholder: String { return self._s[3319]! } - public var Privacy_SecretChatsLinkPreviewsHelp: String { return self._s[3320]! } - public var Conversation_ClearSecretHistory: String { return self._s[3321]! } - public var PeopleNearby_Description: String { return self._s[3323]! } - public var NetworkUsageSettings_Title: String { return self._s[3324]! } - public var Your_cards_security_code_is_invalid: String { return self._s[3326]! } + public func Notification_CreatedChat(_ _0: String) -> (String, [(Int, NSRange)]) { + return formatWithArgumentRanges(self._s[3298]!, self._r[3298]!, [_0]) + } + public var Exceptions_AddToExceptions: String { return self._s[3299]! } + public var AccessDenied_Settings: String { return self._s[3300]! } + public var Passport_Address_TypeUtilityBillUploadScan: String { return self._s[3301]! } + public var Month_ShortMay: String { return self._s[3302]! } + public var Compose_NewGroup: String { return self._s[3303]! } + public var Group_Setup_TypePrivate: String { return self._s[3305]! } + public var Login_PadPhoneHelpTitle: String { return self._s[3307]! } + public var Appearance_ThemeDayClassic: String { return self._s[3308]! } + public var Channel_AdminLog_MessagePreviousCaption: String { return self._s[3309]! } + public var AutoDownloadSettings_OffForAll: String { return self._s[3310]! } + public var Privacy_GroupsAndChannels_WhoCanAddMe: String { return self._s[3311]! } + public var Conversation_typing: String { return self._s[3313]! } + public var Paint_Masks: String { return self._s[3314]! } + public var Contacts_DeselectAll: String { return self._s[3315]! } + public var Username_InvalidTaken: String { return self._s[3316]! } + public var Call_StatusNoAnswer: String { return self._s[3317]! } + public var TwoStepAuth_EmailAddSuccess: String { return self._s[3318]! } + public var SettingsSearch_Synonyms_Privacy_BlockedUsers: String { return self._s[3319]! } + public var Passport_Identity_Selfie: String { return self._s[3320]! } + public var Login_InfoLastNamePlaceholder: String { return self._s[3321]! } + public var Privacy_SecretChatsLinkPreviewsHelp: String { return self._s[3322]! } + public var Conversation_ClearSecretHistory: String { return self._s[3323]! } + public var PeopleNearby_Description: String { return self._s[3325]! } + public var NetworkUsageSettings_Title: String { return self._s[3326]! } + public var Your_cards_security_code_is_invalid: String { return self._s[3328]! } public func Notification_LeftChannel(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3328]!, self._r[3328]!, [_0]) + return formatWithArgumentRanges(self._s[3330]!, self._r[3330]!, [_0]) } public func Call_CallInProgressMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3329]!, self._r[3329]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3331]!, self._r[3331]!, [_1, _2]) } - public var SaveIncomingPhotosSettings_From: String { return self._s[3331]! } - public var Map_LiveLocationTitle: String { return self._s[3332]! } - public var Login_InfoAvatarAdd: String { return self._s[3333]! } - public var Passport_Identity_FilesView: String { return self._s[3334]! } - public var UserInfo_GenericPhoneLabel: String { return self._s[3335]! } - public var Privacy_Calls_NeverAllow: String { return self._s[3336]! } + public var SaveIncomingPhotosSettings_From: String { return self._s[3333]! } + public var Map_LiveLocationTitle: String { return self._s[3334]! } + public var Login_InfoAvatarAdd: String { return self._s[3335]! } + public var Passport_Identity_FilesView: String { return self._s[3336]! } + public var UserInfo_GenericPhoneLabel: String { return self._s[3337]! } + public var Privacy_Calls_NeverAllow: String { return self._s[3338]! } public func Contacts_AddPhoneNumber(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3337]!, self._r[3337]!, [_0]) + return formatWithArgumentRanges(self._s[3339]!, self._r[3339]!, [_0]) } - public var ContactInfo_PhoneNumberHidden: String { return self._s[3338]! } - public var TwoStepAuth_ConfirmationText: String { return self._s[3339]! } - public var ChatSettings_AutomaticVideoMessageDownload: String { return self._s[3340]! } + public var ContactInfo_PhoneNumberHidden: String { return self._s[3340]! } + public var TwoStepAuth_ConfirmationText: String { return self._s[3341]! } + public var ChatSettings_AutomaticVideoMessageDownload: String { return self._s[3342]! } public func PUSH_CHAT_MESSAGE_VIDEOS(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3341]!, self._r[3341]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[3343]!, self._r[3343]!, [_1, _2, _3]) } - public var Channel_AdminLogFilter_AdminsAll: String { return self._s[3342]! } - public var Tour_Title2: String { return self._s[3343]! } - public var Conversation_FileOpenIn: String { return self._s[3344]! } - public var Checkout_ErrorPrecheckoutFailed: String { return self._s[3345]! } - public var Wallpaper_Set: String { return self._s[3346]! } - public var Passport_Identity_Translations: String { return self._s[3348]! } + public var Channel_AdminLogFilter_AdminsAll: String { return self._s[3344]! } + public var Tour_Title2: String { return self._s[3345]! } + public var Conversation_FileOpenIn: String { return self._s[3346]! } + public var Checkout_ErrorPrecheckoutFailed: String { return self._s[3347]! } + public var Wallpaper_Set: String { return self._s[3348]! } + public var Passport_Identity_Translations: String { return self._s[3350]! } public func Channel_AdminLog_MessageChangedChannelAbout(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3349]!, self._r[3349]!, [_0]) + return formatWithArgumentRanges(self._s[3351]!, self._r[3351]!, [_0]) } - public var Channel_LeaveChannel: String { return self._s[3350]! } + public var Channel_LeaveChannel: String { return self._s[3352]! } public func PINNED_INVOICE(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3351]!, self._r[3351]!, [_1]) + return formatWithArgumentRanges(self._s[3353]!, self._r[3353]!, [_1]) } - public var SettingsSearch_Synonyms_Proxy_AddProxy: String { return self._s[3352]! } - public var PhotoEditor_HighlightsTint: String { return self._s[3353]! } - public var Passport_Email_Delete: String { return self._s[3354]! } - public var Conversation_Mute: String { return self._s[3356]! } - public var Channel_AddBotAsAdmin: String { return self._s[3357]! } - public var Channel_AdminLog_CanSendMessages: String { return self._s[3359]! } - public var Channel_Management_LabelOwner: String { return self._s[3361]! } + public var SettingsSearch_Synonyms_Proxy_AddProxy: String { return self._s[3354]! } + public var PhotoEditor_HighlightsTint: String { return self._s[3355]! } + public var Passport_Email_Delete: String { return self._s[3356]! } + public var Conversation_Mute: String { return self._s[3358]! } + public var Channel_AddBotAsAdmin: String { return self._s[3359]! } + public var Channel_AdminLog_CanSendMessages: String { return self._s[3361]! } + public var Channel_Management_LabelOwner: String { return self._s[3363]! } public func Notification_PassportValuesSentMessage(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3362]!, self._r[3362]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3364]!, self._r[3364]!, [_1, _2]) } - public var Calls_CallTabDescription: String { return self._s[3363]! } - public var Passport_Identity_NativeNameHelp: String { return self._s[3364]! } - public var Common_No: String { return self._s[3365]! } - public var Weekday_Sunday: String { return self._s[3366]! } - public var Notification_Reply: String { return self._s[3367]! } - public var Conversation_ViewMessage: String { return self._s[3368]! } + public var Calls_CallTabDescription: String { return self._s[3365]! } + public var Passport_Identity_NativeNameHelp: String { return self._s[3366]! } + public var Common_No: String { return self._s[3367]! } + public var Weekday_Sunday: String { return self._s[3368]! } + public var Notification_Reply: String { return self._s[3369]! } + public var Conversation_ViewMessage: String { return self._s[3370]! } public func Checkout_SavePasswordTimeoutAndFaceId(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3369]!, self._r[3369]!, [_0]) + return formatWithArgumentRanges(self._s[3371]!, self._r[3371]!, [_0]) } public func Map_LiveLocationPrivateDescription(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3370]!, self._r[3370]!, [_0]) + return formatWithArgumentRanges(self._s[3372]!, self._r[3372]!, [_0]) } - public var SettingsSearch_Synonyms_EditProfile_AddAccount: String { return self._s[3371]! } - public var Message_PinnedDocumentMessage: String { return self._s[3372]! } - public var DialogList_TabTitle: String { return self._s[3374]! } - public var ChatSettings_AutoPlayTitle: String { return self._s[3375]! } - public var Passport_FieldEmail: String { return self._s[3376]! } - public var Conversation_UnpinMessageAlert: String { return self._s[3377]! } - public var Passport_Address_TypeBankStatement: String { return self._s[3378]! } - public var Passport_Identity_ExpiryDate: String { return self._s[3379]! } - public var Privacy_Calls_P2P: String { return self._s[3380]! } + public var SettingsSearch_Synonyms_EditProfile_AddAccount: String { return self._s[3373]! } + public var Message_PinnedDocumentMessage: String { return self._s[3374]! } + public var DialogList_TabTitle: String { return self._s[3376]! } + public var ChatSettings_AutoPlayTitle: String { return self._s[3377]! } + public var Passport_FieldEmail: String { return self._s[3378]! } + public var Conversation_UnpinMessageAlert: String { return self._s[3379]! } + public var Passport_Address_TypeBankStatement: String { return self._s[3380]! } + public var Passport_Identity_ExpiryDate: String { return self._s[3381]! } + public var Privacy_Calls_P2P: String { return self._s[3382]! } public func CancelResetAccount_Success(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3382]!, self._r[3382]!, [_0]) + return formatWithArgumentRanges(self._s[3384]!, self._r[3384]!, [_0]) } - public var SocksProxySetup_UseForCallsHelp: String { return self._s[3383]! } + public var SocksProxySetup_UseForCallsHelp: String { return self._s[3385]! } public func PUSH_CHAT_ALBUM(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3384]!, self._r[3384]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3386]!, self._r[3386]!, [_1, _2]) } - public var Stickers_ClearRecent: String { return self._s[3385]! } - public var EnterPasscode_ChangeTitle: String { return self._s[3386]! } - public var Passport_InfoText: String { return self._s[3387]! } - public var Checkout_NewCard_SaveInfoEnableHelp: String { return self._s[3388]! } + public var Stickers_ClearRecent: String { return self._s[3387]! } + public var EnterPasscode_ChangeTitle: String { return self._s[3388]! } + public var Passport_InfoText: String { return self._s[3389]! } + public var Checkout_NewCard_SaveInfoEnableHelp: String { return self._s[3390]! } public func Login_InvalidPhoneEmailSubject(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3389]!, self._r[3389]!, [_0]) + return formatWithArgumentRanges(self._s[3391]!, self._r[3391]!, [_0]) } public func Time_PreciseDate_m3(_ _1: String, _ _2: String, _ _3: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3390]!, self._r[3390]!, [_1, _2, _3]) + return formatWithArgumentRanges(self._s[3392]!, self._r[3392]!, [_1, _2, _3]) } - public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChannels: String { return self._s[3391]! } - public var Passport_Identity_EditDriversLicense: String { return self._s[3392]! } - public var Conversation_TapAndHoldToRecord: String { return self._s[3394]! } - public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChats: String { return self._s[3395]! } + public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChannels: String { return self._s[3393]! } + public var Passport_Identity_EditDriversLicense: String { return self._s[3394]! } + public var Conversation_TapAndHoldToRecord: String { return self._s[3396]! } + public var SettingsSearch_Synonyms_Notifications_BadgeIncludeMutedChats: String { return self._s[3397]! } public func Notification_CallTimeFormat(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3396]!, self._r[3396]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3398]!, self._r[3398]!, [_1, _2]) } - public var Channel_EditAdmin_PermissionInviteViaLink: String { return self._s[3398]! } + public var Channel_EditAdmin_PermissionInviteViaLink: String { return self._s[3400]! } public func Generic_OpenHiddenLinkAlert(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3400]!, self._r[3400]!, [_0]) + return formatWithArgumentRanges(self._s[3402]!, self._r[3402]!, [_0]) } - public var DialogList_Unread: String { return self._s[3401]! } + public var DialogList_Unread: String { return self._s[3403]! } public func PUSH_CHAT_MESSAGE_GIF(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3402]!, self._r[3402]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3404]!, self._r[3404]!, [_1, _2]) } - public var User_DeletedAccount: String { return self._s[3403]! } - public var OwnershipTransfer_SetupTwoStepAuth: String { return self._s[3404]! } + public var User_DeletedAccount: String { return self._s[3405]! } + public var OwnershipTransfer_SetupTwoStepAuth: String { return self._s[3406]! } public func Watch_Time_ShortYesterdayAt(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3405]!, self._r[3405]!, [_0]) + return formatWithArgumentRanges(self._s[3407]!, self._r[3407]!, [_0]) } - public var UserInfo_NotificationsDefault: String { return self._s[3406]! } - public var SharedMedia_CategoryMedia: String { return self._s[3407]! } - public var SocksProxySetup_ProxyStatusUnavailable: String { return self._s[3408]! } - public var Channel_AdminLog_MessageRestrictedForever: String { return self._s[3409]! } - public var Watch_ChatList_Compose: String { return self._s[3410]! } - public var Notifications_MessageNotificationsExceptionsHelp: String { return self._s[3411]! } - public var AutoDownloadSettings_Delimeter: String { return self._s[3412]! } - public var Watch_Microphone_Access: String { return self._s[3413]! } - public var Group_Setup_HistoryHeader: String { return self._s[3414]! } - public var Map_SetThisLocation: String { return self._s[3415]! } - public var Activity_UploadingPhoto: String { return self._s[3416]! } - public var Conversation_Edit: String { return self._s[3418]! } - public var Group_ErrorSendRestrictedMedia: String { return self._s[3419]! } - public var Login_TermsOfServiceDecline: String { return self._s[3420]! } - public var Message_PinnedContactMessage: String { return self._s[3421]! } + public var UserInfo_NotificationsDefault: String { return self._s[3408]! } + public var SharedMedia_CategoryMedia: String { return self._s[3409]! } + public var SocksProxySetup_ProxyStatusUnavailable: String { return self._s[3410]! } + public var Channel_AdminLog_MessageRestrictedForever: String { return self._s[3411]! } + public var Watch_ChatList_Compose: String { return self._s[3412]! } + public var Notifications_MessageNotificationsExceptionsHelp: String { return self._s[3413]! } + public var AutoDownloadSettings_Delimeter: String { return self._s[3414]! } + public var Watch_Microphone_Access: String { return self._s[3415]! } + public var Group_Setup_HistoryHeader: String { return self._s[3416]! } + public var Map_SetThisLocation: String { return self._s[3417]! } + public var Activity_UploadingPhoto: String { return self._s[3418]! } + public var Conversation_Edit: String { return self._s[3420]! } + public var Group_ErrorSendRestrictedMedia: String { return self._s[3421]! } + public var Login_TermsOfServiceDecline: String { return self._s[3422]! } + public var Message_PinnedContactMessage: String { return self._s[3423]! } public func Channel_AdminLog_MessageRestrictedNameUsername(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3422]!, self._r[3422]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3424]!, self._r[3424]!, [_1, _2]) } public func Login_PhoneBannedEmailBody(_ _1: String, _ _2: String, _ _3: String, _ _4: String, _ _5: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3423]!, self._r[3423]!, [_1, _2, _3, _4, _5]) + return formatWithArgumentRanges(self._s[3425]!, self._r[3425]!, [_1, _2, _3, _4, _5]) } - public var Appearance_LargeEmoji: String { return self._s[3424]! } - public var TwoStepAuth_AdditionalPassword: String { return self._s[3426]! } + public var Appearance_LargeEmoji: String { return self._s[3426]! } + public var TwoStepAuth_AdditionalPassword: String { return self._s[3428]! } public func PUSH_CHAT_DELETE_YOU(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3427]!, self._r[3427]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3429]!, self._r[3429]!, [_1, _2]) } - public var Passport_Phone_EnterOtherNumber: String { return self._s[3428]! } - public var Message_PinnedPhotoMessage: String { return self._s[3429]! } - public var Passport_FieldPhone: String { return self._s[3430]! } - public var TwoStepAuth_RecoveryEmailAddDescription: String { return self._s[3431]! } - public var ChatSettings_AutoPlayGifs: String { return self._s[3432]! } - public var InfoPlist_NSCameraUsageDescription: String { return self._s[3434]! } - public var Conversation_Call: String { return self._s[3435]! } - public var Common_TakePhoto: String { return self._s[3437]! } - public var Channel_NotificationLoading: String { return self._s[3438]! } + public var Passport_Phone_EnterOtherNumber: String { return self._s[3430]! } + public var Message_PinnedPhotoMessage: String { return self._s[3431]! } + public var Passport_FieldPhone: String { return self._s[3432]! } + public var TwoStepAuth_RecoveryEmailAddDescription: String { return self._s[3433]! } + public var ChatSettings_AutoPlayGifs: String { return self._s[3434]! } + public var InfoPlist_NSCameraUsageDescription: String { return self._s[3436]! } + public var Conversation_Call: String { return self._s[3437]! } + public var Common_TakePhoto: String { return self._s[3439]! } + public var Channel_NotificationLoading: String { return self._s[3440]! } public func Notification_Exceptions_Sound(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3439]!, self._r[3439]!, [_0]) + return formatWithArgumentRanges(self._s[3441]!, self._r[3441]!, [_0]) } public func PUSH_CHANNEL_MESSAGE_VIDEO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3440]!, self._r[3440]!, [_1]) + return formatWithArgumentRanges(self._s[3442]!, self._r[3442]!, [_1]) } - public var Permissions_SiriTitle_v0: String { return self._s[3441]! } + public var Permissions_SiriTitle_v0: String { return self._s[3443]! } public func Login_ResetAccountProtected_Text(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3442]!, self._r[3442]!, [_0]) + return formatWithArgumentRanges(self._s[3444]!, self._r[3444]!, [_0]) } - public var Channel_MessagePhotoRemoved: String { return self._s[3443]! } - public var Common_edit: String { return self._s[3444]! } - public var PrivacySettings_AuthSessions: String { return self._s[3445]! } - public var Month_ShortJune: String { return self._s[3446]! } - public var PrivacyLastSeenSettings_AlwaysShareWith_Placeholder: String { return self._s[3447]! } - public var Call_ReportSend: String { return self._s[3448]! } - public var Watch_LastSeen_JustNow: String { return self._s[3449]! } - public var Notifications_MessageNotifications: String { return self._s[3450]! } - public var WallpaperSearch_ColorGreen: String { return self._s[3451]! } - public var BroadcastListInfo_AddRecipient: String { return self._s[3453]! } - public var Group_Status: String { return self._s[3454]! } + public var Channel_MessagePhotoRemoved: String { return self._s[3445]! } + public var Common_edit: String { return self._s[3446]! } + public var PrivacySettings_AuthSessions: String { return self._s[3447]! } + public var Month_ShortJune: String { return self._s[3448]! } + public var PrivacyLastSeenSettings_AlwaysShareWith_Placeholder: String { return self._s[3449]! } + public var Call_ReportSend: String { return self._s[3450]! } + public var Watch_LastSeen_JustNow: String { return self._s[3451]! } + public var Notifications_MessageNotifications: String { return self._s[3452]! } + public var WallpaperSearch_ColorGreen: String { return self._s[3453]! } + public var BroadcastListInfo_AddRecipient: String { return self._s[3455]! } + public var Group_Status: String { return self._s[3456]! } public func AutoNightTheme_LocationHelp(_ _0: String, _ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3455]!, self._r[3455]!, [_0, _1]) + return formatWithArgumentRanges(self._s[3457]!, self._r[3457]!, [_0, _1]) } - public var TextFormat_AddLinkTitle: String { return self._s[3456]! } - public var ShareMenu_ShareTo: String { return self._s[3457]! } - public var Conversation_Moderate_Ban: String { return self._s[3458]! } + public var TextFormat_AddLinkTitle: String { return self._s[3458]! } + public var ShareMenu_ShareTo: String { return self._s[3459]! } + public var Conversation_Moderate_Ban: String { return self._s[3460]! } public func Conversation_DeleteMessagesFor(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3459]!, self._r[3459]!, [_0]) + return formatWithArgumentRanges(self._s[3461]!, self._r[3461]!, [_0]) } - public var SharedMedia_ViewInChat: String { return self._s[3460]! } - public var Map_LiveLocationFor8Hours: String { return self._s[3461]! } + public var SharedMedia_ViewInChat: String { return self._s[3462]! } + public var Map_LiveLocationFor8Hours: String { return self._s[3463]! } public func PUSH_PINNED_PHOTO(_ _1: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3462]!, self._r[3462]!, [_1]) + return formatWithArgumentRanges(self._s[3464]!, self._r[3464]!, [_1]) } public func PUSH_PINNED_POLL(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3463]!, self._r[3463]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3465]!, self._r[3465]!, [_1, _2]) } public func Map_AccurateTo(_ _0: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3465]!, self._r[3465]!, [_0]) + return formatWithArgumentRanges(self._s[3467]!, self._r[3467]!, [_0]) } - public var Map_OpenInHereMaps: String { return self._s[3466]! } - public var Appearance_ReduceMotion: String { return self._s[3467]! } + public var Map_OpenInHereMaps: String { return self._s[3468]! } + public var Appearance_ReduceMotion: String { return self._s[3469]! } public func PUSH_MESSAGE_TEXT(_ _1: String, _ _2: String) -> (String, [(Int, NSRange)]) { - return formatWithArgumentRanges(self._s[3468]!, self._r[3468]!, [_1, _2]) + return formatWithArgumentRanges(self._s[3470]!, self._r[3470]!, [_1, _2]) } - public var Channel_Setup_TypePublicHelp: String { return self._s[3469]! } - public var Passport_Identity_EditInternalPassport: String { return self._s[3470]! } - public var PhotoEditor_Skip: String { return self._s[3471]! } - public func UserCount(_ value: Int32) -> String { + public var Channel_Setup_TypePublicHelp: String { return self._s[3471]! } + public var Passport_Identity_EditInternalPassport: String { return self._s[3472]! } + public var PhotoEditor_Skip: String { return self._s[3473]! } + public func SharedMedia_Video(_ value: Int32) -> String { let form = presentationStringsPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) return String(format: self._ps[0 * 6 + Int(form.rawValue)]!, stringValue) } - public func Media_ShareVideo(_ value: Int32) -> String { + public func GroupInfo_ParticipantCount(_ value: Int32) -> String { let form = presentationStringsPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) return String(format: self._ps[1 * 6 + Int(form.rawValue)]!, stringValue) } - public func Notifications_ExceptionMuteExpires_Hours(_ value: Int32) -> String { + public func MessageTimer_Days(_ value: Int32) -> String { let form = presentationStringsPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) return String(format: self._ps[2 * 6 + Int(form.rawValue)]!, stringValue) } - public func Conversation_StatusOnline(_ value: Int32) -> String { + public func DialogList_LiveLocationChatsCount(_ value: Int32) -> String { let form = presentationStringsPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) return String(format: self._ps[3 * 6 + Int(form.rawValue)]!, stringValue) } - public func PUSH_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[4 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func MessageTimer_Minutes(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[5 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGE_PHOTOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[6 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func PUSH_CHANNEL_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[7 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func SharedMedia_Photo(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[8 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_ShortHours(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[9 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Passport_Scans(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[10 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Notifications_ExceptionMuteExpires_Minutes(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[11 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedStickers(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[12 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MuteExpires_Hours(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[13 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedGifs(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[14 * 6 + Int(form.rawValue)]!, stringValue) - } - public func StickerPack_RemoveStickerCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[15 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ServiceMessage_GameScoreSelfSimple(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[16 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGE_VIDEOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[17 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func Media_ShareItem(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[18 * 6 + Int(form.rawValue)]!, stringValue) - } - public func SharedMedia_File(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[19 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedPhotos(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[20 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Media_SharePhoto(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[21 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ServiceMessage_GameScoreExtended(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[22 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedLocations(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[23 * 6 + Int(form.rawValue)]!, stringValue) - } - public func LastSeen_MinutesAgo(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[24 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHANNEL_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[25 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func Watch_LastSeen_HoursAgo(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[26 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_ShortDays(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[27 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_Seconds(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[28 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ChatList_DeleteConfirmation(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[29 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MuteFor_Hours(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[30 * 6 + Int(form.rawValue)]!, stringValue) - } - public func SharedMedia_Generic(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[31 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Notifications_Exceptions(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[32 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MuteFor_Days(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[33 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Map_ETAMinutes(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[34 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_ShortWeeks(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[35 * 6 + Int(form.rawValue)]!, stringValue) - } - public func SharedMedia_Link(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[36 * 6 + Int(form.rawValue)]!, stringValue) - } public func ServiceMessage_GameScoreSimple(_ value: Int32) -> String { let form = presentationStringsPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[37 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Wallpaper_DeleteConfirmation(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[38 * 6 + Int(form.rawValue)]!, stringValue) - } - public func StickerPack_StickerCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[39 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedMessages(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[40 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Notifications_ExceptionMuteExpires_Days(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[41 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessagePoll_VotedCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[42 * 6 + Int(form.rawValue)]!, stringValue) - } - public func AttachmentMenu_SendItem(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[43 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MuteExpires_Minutes(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[44 * 6 + Int(form.rawValue)]!, stringValue) - } - public func SharedMedia_DeleteItemsConfirmation(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[45 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGES(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[46 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func Notification_GameScoreSelfSimple(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[47 * 6 + Int(form.rawValue)]!, stringValue) - } - public func AttachmentMenu_SendGif(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[48 * 6 + Int(form.rawValue)]!, stringValue) - } - public func GroupInfo_ParticipantCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[49 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_Minutes(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[50 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_ShortSeconds(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[51 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_Months(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[52 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGE_ROUNDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[53 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func Chat_DeleteMessagesConfirmation(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[54 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Conversation_StatusMembers(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[55 * 6 + Int(form.rawValue)]!, stringValue) - } - public func StickerPack_AddMaskCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[56 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Contacts_ImportersCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[57 * 6 + Int(form.rawValue)]!, stringValue) - } - public func LastSeen_HoursAgo(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[58 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedPolls(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[59 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[60 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func AttachmentMenu_SendPhoto(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[61 * 6 + Int(form.rawValue)]!, stringValue) - } - public func InviteText_ContactsCountText(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[62 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PasscodeSettings_FailedAttempts(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[63 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedContacts(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[64 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PrivacyLastSeenSettings_AddUsers(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[65 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Conversation_StatusSubscribers(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[66 * 6 + Int(form.rawValue)]!, stringValue) - } - public func DialogList_LiveLocationChatsCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[67 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[68 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func Invitation_Members(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[69 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedFiles(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[70 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Notification_GameScoreExtended(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[71 * 6 + Int(form.rawValue)]!, stringValue) - } - public func LiveLocationUpdated_MinutesAgo(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[72 * 6 + Int(form.rawValue)]!, stringValue) - } - public func LiveLocation_MenuChatsCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[73 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHAT_MESSAGE_FWDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[74 * 6 + Int(form.rawValue)]!, _2, _1, _3) - } - public func Forward_ConfirmMultipleFiles(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[75 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MuteExpires_Days(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[76 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_ShortSeconds(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[77 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_Hours(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[78 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ServiceMessage_GameScoreSelfExtended(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[79 * 6 + Int(form.rawValue)]!, stringValue) - } - public func SharedMedia_Video(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[80 * 6 + Int(form.rawValue)]!, stringValue) - } - public func StickerPack_AddStickerCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[81 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHANNEL_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[82 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func Notification_GameScoreSelfExtended(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[83 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Map_ETAHours(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[84 * 6 + Int(form.rawValue)]!, stringValue) - } - public func StickerPack_RemoveMaskCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[85 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_ShortMinutes(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[86 * 6 + Int(form.rawValue)]!, stringValue) - } - public func CreatePoll_AddMoreOptions(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[87 * 6 + Int(form.rawValue)]!, stringValue) - } - public func AttachmentMenu_SendVideo(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[88 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[89 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func ChatList_SelectedChats(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[90 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedAudios(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[91 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedVideoMessages(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[92 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Notification_GameScoreSimple(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[93 * 6 + Int(form.rawValue)]!, stringValue) - } - public func ForwardedAuthorsOthers(_ selector: Int32, _ _0: String, _ _1: String) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[94 * 6 + Int(form.rawValue)]!, _0, _1) - } - public func MessageTimer_ShortMinutes(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[95 * 6 + Int(form.rawValue)]!, stringValue) - } - public func PUSH_CHANNEL_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[96 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func PUSH_CHANNEL_MESSAGE_VIDEOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[97 * 6 + Int(form.rawValue)]!, _1, _2) - } - public func Watch_UserInfo_Mute(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[98 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Conversation_LiveLocationMembersCount(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[99 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_Years(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[100 * 6 + Int(form.rawValue)]!, stringValue) - } - public func QuickSend_Photos(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[101 * 6 + Int(form.rawValue)]!, stringValue) - } - public func MessageTimer_Weeks(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[102 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Watch_LastSeen_MinutesAgo(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[103 * 6 + Int(form.rawValue)]!, stringValue) - } - public func Call_Seconds(_ value: Int32) -> String { - let form = presentationStringsPluralizationForm(self.lc, value) - let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[104 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[4 * 6 + Int(form.rawValue)]!, stringValue) } public func ForwardedVideos(_ value: Int32) -> String { let form = presentationStringsPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) - return String(format: self._ps[105 * 6 + Int(form.rawValue)]!, stringValue) + return String(format: self._ps[5 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Wallpaper_DeleteConfirmation(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[6 * 6 + Int(form.rawValue)]!, stringValue) + } + public func QuickSend_Photos(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[7 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Watch_LastSeen_HoursAgo(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[8 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGE_FWDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[9 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func SharedMedia_Photo(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[10 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Weeks(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[11 * 6 + Int(form.rawValue)]!, stringValue) + } + public func CreatePoll_AddMoreOptions(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[12 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Hours(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[13 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedVideoMessages(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[14 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGE_VIDEOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[15 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func StickerPack_StickerCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[16 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notification_GameScoreSelfExtended(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[17 * 6 + Int(form.rawValue)]!, stringValue) + } + public func AttachmentMenu_SendItem(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[18 * 6 + Int(form.rawValue)]!, stringValue) + } + public func StickerPack_AddMaskCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[19 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_ShortSeconds(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[20 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[21 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func PUSH_CHAT_MESSAGE_PHOTOS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[22 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func Call_Minutes(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[23 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGE_ROUNDS(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[24 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func Call_Seconds(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[25 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHANNEL_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[26 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func ForwardedGifs(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[27 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notifications_Exceptions(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[28 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notifications_ExceptionMuteExpires_Days(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[29 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Watch_UserInfo_Mute(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[30 * 6 + Int(form.rawValue)]!, stringValue) + } + public func LastSeen_HoursAgo(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[31 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedFiles(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[32 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedContacts(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[33 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_StatusSubscribers(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[34 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notification_GameScoreSimple(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[35 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Seconds(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[36 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Chat_DeleteMessagesConfirmation(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[37 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Map_ETAHours(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[38 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_StatusMembers(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[39 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ChatList_SelectedChats(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[40 * 6 + Int(form.rawValue)]!, stringValue) + } + public func AttachmentMenu_SendGif(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[41 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_StatusOnline(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[42 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHANNEL_MESSAGE_VIDEOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[43 * 6 + Int(form.rawValue)]!, _1, _2) } public func PUSH_MESSAGE_VIDEOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { let form = presentationStringsPluralizationForm(self.lc, selector) - return String(format: self._ps[106 * 6 + Int(form.rawValue)]!, _1, _2) + return String(format: self._ps[44 * 6 + Int(form.rawValue)]!, _1, _2) } - public func MessageTimer_Days(_ value: Int32) -> String { + public func ForwardedPolls(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[45 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MuteFor_Days(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[46 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Years(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[47 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedMessages(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[48 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Media_SharePhoto(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[49 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHAT_MESSAGES(_ selector: Int32, _ _2: String, _ _1: String, _ _3: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[50 * 6 + Int(form.rawValue)]!, _2, _1, _3) + } + public func MessageTimer_Months(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[51 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Call_ShortSeconds(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[52 * 6 + Int(form.rawValue)]!, stringValue) + } + public func UserCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[53 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Contacts_ImportersCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[54 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Media_ShareItem(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[55 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedPhotos(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[56 * 6 + Int(form.rawValue)]!, stringValue) + } + public func StickerPack_RemoveStickerCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[57 * 6 + Int(form.rawValue)]!, stringValue) + } + public func StickerPack_RemoveMaskCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[58 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Conversation_LiveLocationMembersCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[59 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHANNEL_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[60 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func Forward_ConfirmMultipleFiles(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[61 * 6 + Int(form.rawValue)]!, stringValue) + } + public func SharedMedia_File(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[62 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notification_GameScoreExtended(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[63 * 6 + Int(form.rawValue)]!, stringValue) + } + public func SharedMedia_DeleteItemsConfirmation(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[64 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedLocations(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[65 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MuteExpires_Minutes(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[66 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Watch_LastSeen_MinutesAgo(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[67 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ServiceMessage_GameScoreSelfSimple(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[68 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Passport_Scans(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[69 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Invitation_Members(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[70 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MuteFor_Hours(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[71 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_MESSAGE_ROUNDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[72 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func ForwardedAuthorsOthers(_ selector: Int32, _ _0: String, _ _1: String) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[73 * 6 + Int(form.rawValue)]!, _0, _1) + } + public func PUSH_MESSAGES(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[74 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func PrivacyLastSeenSettings_AddUsers(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[75 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_ShortMinutes(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[76 * 6 + Int(form.rawValue)]!, stringValue) + } + public func StickerPack_AddStickerCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[77 * 6 + Int(form.rawValue)]!, stringValue) + } + public func AttachmentMenu_SendPhoto(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[78 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notification_GameScoreSelfSimple(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[79 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_ShortHours(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[80 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Media_ShareVideo(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[81 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_ShortWeeks(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[82 * 6 + Int(form.rawValue)]!, stringValue) + } + public func InviteText_ContactsCountText(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[83 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedAudios(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[84 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ServiceMessage_GameScoreSelfExtended(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[85 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessagePoll_VotedCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[86 * 6 + Int(form.rawValue)]!, stringValue) + } + public func SharedMedia_Link(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[87 * 6 + Int(form.rawValue)]!, stringValue) + } + public func SharedMedia_Generic(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[88 * 6 + Int(form.rawValue)]!, stringValue) + } + public func LastSeen_MinutesAgo(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[89 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Call_ShortMinutes(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[90 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_Minutes(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[91 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[92 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func PUSH_CHANNEL_MESSAGE_FWDS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[93 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func ChatList_DeleteConfirmation(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[94 * 6 + Int(form.rawValue)]!, stringValue) + } + public func LiveLocation_MenuChatsCount(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[95 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PasscodeSettings_FailedAttempts(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[96 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ServiceMessage_GameScoreExtended(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[97 * 6 + Int(form.rawValue)]!, stringValue) + } + public func AttachmentMenu_SendVideo(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[98 * 6 + Int(form.rawValue)]!, stringValue) + } + public func ForwardedStickers(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[99 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MuteExpires_Hours(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[100 * 6 + Int(form.rawValue)]!, stringValue) + } + public func PUSH_CHANNEL_MESSAGE_PHOTOS(_ selector: Int32, _ _1: String, _ _2: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, selector) + return String(format: self._ps[101 * 6 + Int(form.rawValue)]!, _1, _2) + } + public func Map_ETAMinutes(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[102 * 6 + Int(form.rawValue)]!, stringValue) + } + public func LiveLocationUpdated_MinutesAgo(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[103 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MessageTimer_ShortDays(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[104 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notifications_ExceptionMuteExpires_Minutes(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[105 * 6 + Int(form.rawValue)]!, stringValue) + } + public func MuteExpires_Days(_ value: Int32) -> String { + let form = presentationStringsPluralizationForm(self.lc, value) + let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) + return String(format: self._ps[106 * 6 + Int(form.rawValue)]!, stringValue) + } + public func Notifications_ExceptionMuteExpires_Hours(_ value: Int32) -> String { let form = presentationStringsPluralizationForm(self.lc, value) let stringValue = presentationStringsFormattedNumber(value, self.groupingSeparator) return String(format: self._ps[107 * 6 + Int(form.rawValue)]!, stringValue) diff --git a/submodules/TelegramPresentationData/Sources/PresentationTheme.swift b/submodules/TelegramPresentationData/Sources/PresentationTheme.swift index cb9955f7b6..00f796c0c0 100644 --- a/submodules/TelegramPresentationData/Sources/PresentationTheme.swift +++ b/submodules/TelegramPresentationData/Sources/PresentationTheme.swift @@ -951,7 +951,6 @@ public enum PresentationThemeName: Equatable { public final class PresentationTheme: Equatable { public let name: PresentationThemeName public let overallDarkAppearance: Bool - public let allowsCustomWallpapers: Bool public let auth: PresentationThemeAuth public let passcode: PresentationThemePasscode public let rootController: PresentationThemeRootController @@ -963,10 +962,9 @@ public final class PresentationTheme: Equatable { public let resourceCache: PresentationsResourceCache = PresentationsResourceCache() - public init(name: PresentationThemeName, overallDarkAppearance: Bool, allowsCustomWallpapers: Bool, auth: PresentationThemeAuth, passcode: PresentationThemePasscode, rootController: PresentationThemeRootController, list: PresentationThemeList, chatList: PresentationThemeChatList, chat: PresentationThemeChat, actionSheet: PresentationThemeActionSheet, inAppNotification: PresentationThemeInAppNotification) { + public init(name: PresentationThemeName, overallDarkAppearance: Bool, auth: PresentationThemeAuth, passcode: PresentationThemePasscode, rootController: PresentationThemeRootController, list: PresentationThemeList, chatList: PresentationThemeChatList, chat: PresentationThemeChat, actionSheet: PresentationThemeActionSheet, inAppNotification: PresentationThemeInAppNotification) { self.name = name self.overallDarkAppearance = overallDarkAppearance - self.allowsCustomWallpapers = allowsCustomWallpapers self.auth = auth self.passcode = passcode self.rootController = rootController diff --git a/submodules/TelegramUI/TelegramUI/ChatTextInputAttributes.swift b/submodules/TelegramUI/TelegramUI/ChatTextInputAttributes.swift index a9166ab9e6..032306111a 100644 --- a/submodules/TelegramUI/TelegramUI/ChatTextInputAttributes.swift +++ b/submodules/TelegramUI/TelegramUI/ChatTextInputAttributes.swift @@ -666,7 +666,7 @@ func convertMarkdownToAttributes(_ text: NSAttributedString) -> NSAttributedStri while let match = regex.firstMatch(in: string as String, range: NSMakeRange(0, string.length)) { let matchIndex = stringOffset + match.range.location - result.append(text.attributedSubstring(from: NSMakeRange(0, match.range.location))) + result.append(text.attributedSubstring(from: NSMakeRange(text.length - string.length, match.range.location))) var pre = match.range(at: 3) if pre.location != NSNotFound { diff --git a/submodules/TelegramUI/TelegramUI/CustomWallpaperPicker.swift b/submodules/TelegramUI/TelegramUI/CustomWallpaperPicker.swift index 691a0a0d10..6da820b0a8 100644 --- a/submodules/TelegramUI/TelegramUI/CustomWallpaperPicker.swift +++ b/submodules/TelegramUI/TelegramUI/CustomWallpaperPicker.swift @@ -150,7 +150,7 @@ func uploadCustomWallpaper(context: AccountContext, wallpaper: WallpaperGalleryE let _ = (updatePresentationThemeSettingsInteractively(accountManager: accountManager, { current in var themeSpecificChatWallpapers = current.themeSpecificChatWallpapers themeSpecificChatWallpapers[current.theme.index] = wallpaper - return PresentationThemeSettings(chatWallpaper: wallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) + return PresentationThemeSettings(chatWallpaper: wallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: themeSpecificChatWallpapers, themeTintColors: current.themeTintColors, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) })).start() } diff --git a/submodules/TelegramUI/TelegramUI/ManagedAudioRecorder.swift b/submodules/TelegramUI/TelegramUI/ManagedAudioRecorder.swift index 556320ad5e..f9c0b5a34e 100644 --- a/submodules/TelegramUI/TelegramUI/ManagedAudioRecorder.swift +++ b/submodules/TelegramUI/TelegramUI/ManagedAudioRecorder.swift @@ -10,11 +10,11 @@ import UniversalMediaPlayer private let kOutputBus: UInt32 = 0 private let kInputBus: UInt32 = 1 -private func audioRecorderNativeStreamDescription() -> AudioStreamBasicDescription { +private func audioRecorderNativeStreamDescription(sampleRate: Float64) -> AudioStreamBasicDescription { var canonicalBasicStreamDescription = AudioStreamBasicDescription() - canonicalBasicStreamDescription.mSampleRate = 16000.0 + canonicalBasicStreamDescription.mSampleRate = sampleRate canonicalBasicStreamDescription.mFormatID = kAudioFormatLinearPCM - canonicalBasicStreamDescription.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked + canonicalBasicStreamDescription.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked canonicalBasicStreamDescription.mFramesPerPacket = 1 canonicalBasicStreamDescription.mChannelsPerFrame = 1 canonicalBasicStreamDescription.mBitsPerChannel = 16 @@ -365,7 +365,7 @@ final class ManagedAudioRecorderContext { return } - var audioStreamDescription = audioRecorderNativeStreamDescription() + var audioStreamDescription = audioRecorderNativeStreamDescription(sampleRate: 48000) guard AudioUnitSetProperty(audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 1, &audioStreamDescription, UInt32(MemoryLayout.size)) == noErr else { AudioComponentInstanceDispose(audioUnit) return diff --git a/submodules/TelegramUI/TelegramUI/Resources/PresentationStrings.mapping b/submodules/TelegramUI/TelegramUI/Resources/PresentationStrings.mapping index 31f789d1e6545366a83e15f1627d4c8be6a42fec..2fd92396f0b6517ac68088d5c524d8fc19fd38fc 100644 GIT binary patch delta 4329 zcmZWsd303e6`wouNJ3_^kYqBGNhTW!B*2h>`+~+S5X~fkNkAx?JZ2tb$YkC)Zvv#Y zEUmS*ih}PPuW}HA>|4SfmaxmtDa6_yTdP8C># z-TCb0n1d^0$g`C85%sOfwVO<)vT#_DBXY>6xElhYXjw2=t_IbJ2A1h%zPyH<(n^cT zl&>ds*;wkNR9eLuos=cL0;)~_Bt4buJ1Ne*+MDGG{qa31dS_|8WvUWZBT+%zY~kcA zO5r7IDNWjfJ2P~3hBKx?70j*NyB4Om@jGkjHfg)?lUKY*nWGy+5k>Zwx5$Q#9bhCv zyuL+^s+ImgRE@a3ioxo#=u`Hj4QmKQgND!Dyy#T~w@aAPmyWh`_*NRiy{}S&v#@>v=>LGeyud!qPB&DO4Lx_$F6mB+lc+(rQpIz5w$(+t`5yn-DUo^K&VEY zE8Ok@yI8+go5H_dM=t3Aj`@1BB~>4@Dv__OqZm5GZ?2;(I?SK1qde+m$9gKHBmBU6 zDv*vs+{JP=Wmu}zh%#S^2%E=w`Ff<{B=25NZaT%+){~u1^Ow+|Gn}&lr?Y(51{y1! zgT7N-$BQ>m0-fjQHqZ#^0;nVO6*ea?Y9>pZFnJLqn@+w|{%Qlo(Iu8PQjT;P)Lea) zCp%#$#kwm}a zf=!e!{T}+G^uCEB4SjL-n}EWnDKC5;!!K>3;q(XIwuwg2ANk5A8Y#U6@j`uhX<=-c z-!G*9#KoH_!~C{Ir-+SbZKf1@hr^p`jQL%Qexf>EZ+>@0h~XBYS(LqJ0;=!dt9{zN&5>2w@{AxuNFOLe7gST_{5^da8Q-~UY{Him;Mb( z3HbJ?p=gWS+XB3LPWphq*n;9+=gh76y21Bvr2_LmEL>+H8((>WlK9!J z6mR~}qIbqR^(UUQnm@AevRulUGrdJEmqQ57V}R-t+$7Lcu7*%-O^ycCkUQED4ulLe z{S)kXu?uiGPQtw!_y3*^*(t*GpaYVHa}Q-X?5v^dD7Pq}Ct<1>e|4qogmv$>)b9%8Q$<1jEAe zS6s23is@@sx1+eRy%iZ$DA-(`OtQt&}QQL&Uq5S9$xEjNYc94r=`IQ~$hB$srhz}EXxNaWiln{;Qgf3*;!lhj_imW`d z3xG+0OtJoPv4huik=>kV<&u-+8Y(VLvg*w*+4OI+V))B0vf7g&Dw5ftwns1!0q60; z>~PNRhS?N;up5!3a$7g-*sOZ?%XVJVO-Yo_JG<$2F&nxm+v$K6fsOj=+Sh zb=BpS;=T;d-AScpr&a&p$*fouOjyt4j-80l#VdDGCS`LEPUc+USvr5blTxI7*vsO+ zVdRXjTM+7R_z_l}&Zlzc5(Hbj3oaCJ(=Oz@5VAQ2#8>U2;Uyz+6y02|wzUB^wZ_~W zHQ?WLMQQcR9d2)X2w%dLB7SEVWtoeu`iX5RoV1$~X*B2TrV<*%Q+Cr>^H{51y5GgC zcVm{j`QUCEl~V$10-qHDIjGL9320GwgFJh1I+QZ)L7~PADc!ZkHdNd*!764w&)h?4 zbSsDV&{(>SSMQ;buG=A(42k+kV7~0@aF@%$pysY0UoX_|3Lzr|0aYl+3#! zZw&WF@8qWP$z=^qWi<~rdPK7C;kvzefbL~=FO6{Bchj(}Y2tM;=5m9w&?vz~-nAD) z>VCeumx{~}SdAeSGeKA>v+Btc$MApmQEI%vs?iq@TJ_&Zc3!rRY*fMP_W>1^e0d*D zGFKr%ucz{u{TO|ddE$P$l^$YkKM?ycuiQ_W<{GGOb;MLx3F97qb3fXz7QW^2&f&n( z@E#1jIxgseMm^W`U}jDM6dE#kc@M=&Qz2QXKc4F1-X6R{UL1=s%$xYG;TUTMKqnCJ^&Cu!rKpEn9kt71L&ri{4t2qENCR_xhGSNE_#$p z4pNcy7>G_j_6((4DimKZ(EqGA@zR4d(%fui`A%T=a0Vq<8#N^olG}{gFY|i`sUUVX zl+zF)m(`Mk{9Js9igFbY#ZamrELKHjO=Ux6(~P=Ck&ZbWJ%m)wU_=X~1+eOG zR;((Z1pRo$`yB~@JyKtrn$F)IqI78d#o_Clsvs5sXU}~TZ z8st{R*ako{g?Zg!DwH0FNS1g36TB+=LAVnE3A1ZRmhmuX?C7O@it>HEG@9Bu(2Eky z=jFY?zyjXXOCxC^U+$$0sRMcwUW`TSIF3+a=8tg{5EW2%_pdfyC1gBZPjJN%6znIE z$kWGl6&TI&Q!76nM^4^(1kdhbK6HeNGL}FBlXPIE@J8imy8*wup)u30AHyQE zf`=TZeA{4PgUD@x|TryToeRH;`10P(J4Z>tN7cU(hcrs4Q_@ZidGm4-l@5^+z)>!T%b?nNXd zk>xYw7(K1JqO#5_yb@cxHww>`NWJW9br1Y52WX?hl|0^YnzF2w3#0H{@eAYWJmoCe zr0S^Bmckd#U?!&W(u?HaiD$5Ert#|InC3R)BL46=4aFErK7%dFE=bu95r7E9z^_;F zsUg3XfpZ#KBi-qB;-?5>FqxAAbF@ql>^udAZ_%<$dh%1Ldh@+;{MBoeq`1HneLY={ z`dZv#b{H$Nr#-4K1T743&?&E z_aT{7%s)Mj7kV@wyGVKFF($pO$gy}V)W7GFD6i(eX&BMKEq8_7p^XFW|B5^V|GTsj zaK0D701mWLFhsTc`_AZE16N`l5vJ-J`K8m8lsN&vMJ~UGA7dxgZsl3$$v*rxaK#27 z@@#-grtp!|*vxjGqgZ-?{imt;_AvcKqAlR+juV)&;H)6 zHWuVb;0QblJc$YzwVe!txXc(zo=UH`Y*J-Ye_+)hi$OQ&VOe_=>%3MMZGp9iz!BEI ztLS~$#IK*l^sftC;OBu67l=-T6g@)zjxpBh0a zE6qV?p)V-=D?EX~a>ZXOEH=Sn7=GP#9>46&Zw}T~d4mnISlY~YS|}rN3oJyO?w}_q zI|~$_Pp%1ieM^MNR?go@>H2L3b!o?NwPkE%WTo7s__YwX^SX_cE$zT|tE$Ykg;ptI z%TB(!ky2o?K;(r&D#@%o>TogdpoQHgs7!oh`tN@1-xsQ8`k{wwb_sIxlaM%)Xp z6{fLpSgI`X`kWP>S`CD|H*e$aO+auzf4Yfsqz>5H)N5lCqLs#`205tR?*Jx8s!NN~ z*t?mc=pe7yOb+RgHhZmXIJaU*hxyWG_&Lg7Zl*-)Wa}16rDHs43uQ{jVQN)Z=a_lb z77CY6VCY~^30V!(6~DYp_KW*=@qsP4?*!uV`-0@%*hcTI$8RO^q>_qVsEOU9w1cK%DZLLH+bIN5p;N?>^Y1 ztLx)!{LDf!go~;3n2J}a#>7e6D4Z^E_BKkU*LlV^8bxpL@@grX+bLc8EwC$gWltHJ8_%$xg939Kfxpli!Q|% ztaG~Sz($v6rSS1*rd?#C>zud?IsB0G@FRT$bL8;Z;r!Gtiqikpz~u(S-U3Vg#|E_} z%%(p5qEY{efnP|WWDea;!{`Pl>?Vi#CbmYxZ-vL}3p!n%K)sfVzj5Pkg!37{2qXGC z@7)cmd=A@D8rN>^rfBI449)8LMez}G!(y+-#(!|`9vVUa^dH`7r7v=*h?AG5O6DrT{d!rPxmX0;?_fX<6cTmmasA$ z!~SY1@hw*JmwAF7KWHSZLipNV%A`;ZYXzcV>}-Y8aIS0xQW4zTipV1Q)mF;V8;l&Y zlM?t!D<$fUM$SJ?X3p!O5G^H9oV<^6?89)HfTl`m_B*whHD*R*I^jo^CVqM!MNkZ{ z*@rvEa{E3q>rF;A=_Rvz=XzwQ24kF2ZGYaOPPrb+Z^lq)ME)Y^m&kfN=d@80BAD4m z7Rd~knE*DC*R)Zz-eOcgcrGyv2@$ul@`*O2!p>LP$WDoTON^34hzaV|twZ_2cH|-j z9uoO-1lc0Wm;3sQHkFsQgSBbAxgGGQ!y;MZ>-ER5M|&`_CumZ@$LP{gp)Hnpj2b9$Ew~KY2x`EsI*+J$E<#=QD`y0 z+Cg#p`;5Gy2uNKNgKjN|2>VTv19B}}MJiu88C`13CQB4ivE4p7*{32-cW zg4US|iu0?g^Gm1Bb_wtw!jfn>?x44(9@^t9XplYrO1VbvNBm*#I6&$22)_;g(nMIN z@w*R@eORH-v#3G7tIm@+{UBxQCmS_Y2^}X~Pcf=7lSgshAu@66K?>LB8P(S%GhaRk z8Jf!157J1f01hYe(t|W9EU2+$8W4KR#7&1NMw*VrY_;v5NxT(9D(1t7KVwpg6escZycfY9RmY$=_1t<4%xUBc$DpM?{>w3h zqj1!58X+}dqgAD$iJBBF<@v`UB7R3T`|>R$9r=p8)z#!9GTz(hTtNjA_ z>*?xAilgWFi<9W(-(hnXNWO+AbpeX+^5b1(vwaU6wZ4M{=hxIU`|(<;QUu%9^13d( z9lp=4T{!0ld|B*zfj{Y@Ea^q;%G9J~OgEY7hg{rEX;~us;)PJ4H2XBo6YnpLh-hed zr#v zP!5D}-f6OgRuq?4mAgaL+e7SJeUU<}VX%+EKkXE}FF<{#_7n@}TYcD|9TTBbqYs$S z54ta+9t<3Fk<3=yL)+TP3tA9bKqW!BQPhywJ2=AW-Uivk-RCIY5;w3s2rMoBc<#GE zSt#_|y=1YQVI>@udICW=$Z{8!{3VKoUA@SXl^2{sb=Y7O&v*JLE@hf$Wx$T%|3K=N zYZPB?Ad%-?pw#;vFcDY?9PkS4#~=w4;=I8@7s==~-kM}go7M7(wwx6FC1`qgr#LVb zK(=-%~XZ3k-HHX*tki$L-`$XJ>lR6N?Xnv~~g6zaTXJj6Ww3jt-#aJa2M=x{ALd&+s9*CJL79K6_2;T z{elij=u#)oP^SJtotnGQ#8GF-KohtPccX`R?KuGPFh`#u^QcGQNq}|lrWHy@8!r@$sjZJ%f2&I{;}c{~L^DW9WpDg9KP)>IqLpsy70 z@oqHXX`;$Z6DrGRmrZjQVzVG@iEo(~`XV~~z~g*6X1^AcAZwsVr{<3y&fUFQpZdl{ z=y3@@3;yV5=y+8onI(J(x@U4zFQr*Z;X)IDL8T?g;o^no5Mmi$Jxittt=P(8nyzsn zQ&d&qilFR6$}2Ga-({_7$Sj`QheIoM>Yc^5aB-#^rm5W0M~R7dcUNIbBPNs$B-9R? z&9~2K&F$m!2w@JtehR|#m_RkjI(Oi-!HA0wTleE^I}36>!IRIUrO)H=9*pMmGiSio z1^muy7*z{WSPTOsTL@2aXebGKw+AAXYF~s2L6$k5U`?G Void let openWallpaperSettings: () -> Void let openAccentColor: (Int32) -> Void + let selectAccentColor: (PresentationThemeAccentColor) -> Void + let toggleColorSlider: () -> Void + let toggleTintAllColors: () -> Void let openAutoNightTheme: () -> Void let toggleLargeEmoji: (Bool) -> Void let disableAnimations: (Bool) -> Void let selectAppIcon: (String) -> Void - init(context: AccountContext, selectTheme: @escaping (PresentationThemeReference) -> Void, selectFontSize: @escaping (PresentationFontSize) -> Void, openWallpaperSettings: @escaping () -> Void, openAccentColor: @escaping (Int32) -> Void, openAutoNightTheme: @escaping () -> Void, toggleLargeEmoji: @escaping (Bool) -> Void, disableAnimations: @escaping (Bool) -> Void, selectAppIcon: @escaping (String) -> Void) { + init(context: AccountContext, selectTheme: @escaping (PresentationThemeReference) -> Void, selectFontSize: @escaping (PresentationFontSize) -> Void, openWallpaperSettings: @escaping () -> Void, openAccentColor: @escaping (Int32) -> Void, selectAccentColor: @escaping (PresentationThemeAccentColor) -> Void, toggleColorSlider: @escaping () -> Void, toggleTintAllColors: @escaping () -> Void, openAutoNightTheme: @escaping () -> Void, toggleLargeEmoji: @escaping (Bool) -> Void, disableAnimations: @escaping (Bool) -> Void, selectAppIcon: @escaping (String) -> Void) { self.context = context self.selectTheme = selectTheme self.selectFontSize = selectFontSize self.openWallpaperSettings = openWallpaperSettings self.openAccentColor = openAccentColor + self.selectAccentColor = selectAccentColor + self.toggleColorSlider = toggleColorSlider + self.toggleTintAllColors = toggleTintAllColors self.openAutoNightTheme = openAutoNightTheme self.toggleLargeEmoji = toggleLargeEmoji self.disableAnimations = disableAnimations @@ -42,6 +48,7 @@ private enum ThemeSettingsControllerSection: Int32 { public enum ThemeSettingsEntryTag: ItemListItemTag { case fontSize case theme + case tint case accentColor case icon case largeEmoji @@ -64,6 +71,7 @@ private enum ThemeSettingsControllerEntry: ItemListNodeEntry { case wallpaper(PresentationTheme, String) case accentColor(PresentationTheme, String, PresentationThemeAccentColor?) case autoNightTheme(PresentationTheme, String, String) + case themeTint(PresentationTheme, String, Bool) case themeItem(PresentationTheme, PresentationStrings, [PresentationThemeReference], PresentationThemeReference, [Int64: PresentationThemeAccentColor]) case iconHeader(PresentationTheme, String) case iconItem(PresentationTheme, PresentationStrings, [PresentationAppIcon], String?) @@ -74,7 +82,7 @@ private enum ThemeSettingsControllerEntry: ItemListNodeEntry { var section: ItemListSectionId { switch self { - case .themeListHeader, .chatPreview, .themeItem, .accentColor: + case .themeListHeader, .chatPreview, .themeItem, .themeTint, .accentColor: return ThemeSettingsControllerSection.chatPreview.rawValue case .fontSizeHeader, .fontSize: return ThemeSettingsControllerSection.fontSize.rawValue @@ -95,28 +103,30 @@ private enum ThemeSettingsControllerEntry: ItemListNodeEntry { return 1 case .themeItem: return 2 - case .accentColor: + case .themeTint: return 3 - case .wallpaper: + case .accentColor: return 4 - case .autoNightTheme: + case .wallpaper: return 5 - case .fontSizeHeader: + case .autoNightTheme: return 6 - case .fontSize: + case .fontSizeHeader: return 7 - case .iconHeader: + case .fontSize: return 8 - case .iconItem: + case .iconHeader: return 9 - case .otherHeader: + case .iconItem: return 10 - case .largeEmoji: + case .otherHeader: return 11 - case .animations: + case .largeEmoji: return 12 - case .animationsInfo: + case .animations: return 13 + case .animationsInfo: + return 14 } } @@ -134,6 +144,12 @@ private enum ThemeSettingsControllerEntry: ItemListNodeEntry { } else { return false } + case let .themeTint(lhsTheme, lhsTitle, lhsValue): + if case let .themeTint(rhsTheme, rhsTitle, rhsValue) = rhs, lhsTheme === rhsTheme, lhsTitle == rhsTitle, lhsValue == rhsValue { + return true + } else { + return false + } case let .accentColor(lhsTheme, lhsText, lhsColor): if case let .accentColor(rhsTheme, rhsText, rhsColor) = rhs, lhsTheme === rhsTheme, lhsText == rhsText, lhsColor == rhsColor { return true @@ -227,20 +243,24 @@ private enum ThemeSettingsControllerEntry: ItemListNodeEntry { return ItemListDisclosureItem(theme: theme, title: text, label: "", sectionId: self.section, style: .blocks, action: { arguments.openWallpaperSettings() }) - case let .accentColor(theme, text, color): + case let .themeTint(theme, title, value): + return ItemListSwitchItem(theme: theme, title: title, value: value, sectionId: self.section, style: .blocks, updated: { value in + arguments.toggleLargeEmoji(value) + }, tag: ThemeSettingsEntryTag.tint) + case let .accentColor(theme, _, color): let colorValue = color?.baseColor.colorValue ?? defaultDayAccentColor - let accentColor = UIColor(rgb: UInt32(bitPattern: colorValue)) - return ItemListDisclosureItem(theme: theme, icon: nil, title: text, label: "", labelStyle: .color(accentColor), sectionId: self.section, style: .blocks, disclosureStyle: .arrow, action: { - arguments.openAccentColor(colorValue) +// let accentColor = UIColor(rgb: UInt32(bitPattern: colorValue)) + + var colors = PresentationThemeBaseColor.allCases + if theme.overallDarkAppearance { + colors = colors.filter { $0 != .black } + } + + return ThemeSettingsAccentColorItem(theme: theme, sectionId: self.section, colors: colors, currentColor: color ?? PresentationThemeAccentColor(baseColor: .blue, value: 0.5), updated: { color in + arguments.selectAccentColor(color) + }, toggleSlider: { + arguments.toggleColorSlider() }, tag: ThemeSettingsEntryTag.accentColor) -// return ThemeSettingsAccentColorItem(theme: theme, sectionId: self.section, colors: PresentationThemeBaseColor.allCases, currentColor: color ?? PresentationThemeAccentColor(baseColor: .blue, value: 0.5), updated: { color in -// let _ = updatePresentationThemeSettingsInteractively(accountManager: arguments.context.sharedContext.accountManager, { current in -// var themeSpecificAccentColors = current.themeSpecificAccentColors -// themeSpecificAccentColors[current.theme.index] = color -// return PresentationThemeSettings(chatWallpaper: current.chatWallpaper, theme: current.theme, themeSpecificAccentColors: themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) -// }).start() -// }, toggleSlider: { -// }) case let .autoNightTheme(theme, text, value): return ItemListDisclosureItem(theme: theme, icon: nil, title: text, label: value, labelStyle: .text, sectionId: self.section, style: .blocks, disclosureStyle: .arrow, action: { arguments.openAutoNightTheme() @@ -248,8 +268,10 @@ private enum ThemeSettingsControllerEntry: ItemListNodeEntry { case let .themeListHeader(theme, text): return ItemListSectionHeaderItem(theme: theme, text: text, sectionId: self.section) case let .themeItem(theme, strings, themes, currentTheme, themeSpecificAccentColors): - return ThemeSettingsThemeItem(theme: theme, strings: strings, sectionId: self.section, themes: themes, themeSpecificAccentColors: themeSpecificAccentColors, currentTheme: currentTheme, updated: { theme in + return ThemeSettingsThemeItem(theme: theme, strings: strings, sectionId: self.section, themes: themes, themeSpecificAccentColors: themeSpecificAccentColors, currentTheme: currentTheme, updatedTheme: { theme in arguments.selectTheme(theme) + }, currentColor: nil, updatedColor: { color in + arguments.selectAccentColor(color) }) case let .iconHeader(theme, text): return ItemListSectionHeaderItem(theme: theme, text: text, sectionId: self.section) @@ -273,7 +295,19 @@ private enum ThemeSettingsControllerEntry: ItemListNodeEntry { } } -private func themeSettingsControllerEntries(presentationData: PresentationData, theme: PresentationTheme, themeReference: PresentationThemeReference, themeSpecificAccentColors: [Int64: PresentationThemeAccentColor], autoNightSettings: AutomaticThemeSwitchSetting, strings: PresentationStrings, wallpaper: TelegramWallpaper, fontSize: PresentationFontSize, dateTimeFormat: PresentationDateTimeFormat, largeEmoji: Bool, disableAnimations: Bool, availableAppIcons: [PresentationAppIcon], currentAppIconName: String?) -> [ThemeSettingsControllerEntry] { +private struct ThemeSettingsState: Equatable { + let displayColorSlider: Bool + + init(displayColorSlider: Bool) { + self.displayColorSlider = displayColorSlider + } + + func withDisplayColorSlider(_ displayColorSlider: Bool) -> ThemeSettingsState { + return ThemeSettingsState(displayColorSlider: displayColorSlider) + } +} + +private func themeSettingsControllerEntries(presentationData: PresentationData, theme: PresentationTheme, themeReference: PresentationThemeReference, themeSpecificAccentColors: [Int64: PresentationThemeAccentColor], autoNightSettings: AutomaticThemeSwitchSetting, strings: PresentationStrings, wallpaper: TelegramWallpaper, fontSize: PresentationFontSize, dateTimeFormat: PresentationDateTimeFormat, largeEmoji: Bool, disableAnimations: Bool, availableAppIcons: [PresentationAppIcon], currentAppIconName: String?, displayColorSlider: Bool) -> [ThemeSettingsControllerEntry] { var entries: [ThemeSettingsControllerEntry] = [] entries.append(.themeListHeader(presentationData.theme, strings.Appearance_ColorTheme.uppercased())) @@ -281,7 +315,10 @@ private func themeSettingsControllerEntries(presentationData: PresentationData, if case .builtin = themeReference { entries.append(.themeItem(presentationData.theme, presentationData.strings, [.builtin(.dayClassic), .builtin(.day), .builtin(.nightAccent), .builtin(.nightGrayscale)], themeReference, themeSpecificAccentColors)) } - if theme.name == .builtin(.day) { + if theme.name == .builtin(.nightAccent) || theme.name == .builtin(.nightGrayscale) { + //entries.append(.themeTint(presentationData.theme, strings.Appearance_TintAllColors, false)) + } + if theme.name != .builtin(.dayClassic) { entries.append(.accentColor(presentationData.theme, strings.Appearance_AccentColor, themeSpecificAccentColors[themeReference.index])) } @@ -290,12 +327,12 @@ private func themeSettingsControllerEntries(presentationData: PresentationData, if theme.name == .builtin(.day) || theme.name == .builtin(.dayClassic) { let title: String switch autoNightSettings.trigger { - case .none: - title = strings.AutoNightTheme_Disabled - case .timeBased: - title = strings.AutoNightTheme_Scheduled - case .brightness: - title = strings.AutoNightTheme_Automatic + case .none: + title = strings.AutoNightTheme_Disabled + case .timeBased: + title = strings.AutoNightTheme_Scheduled + case .brightness: + title = strings.AutoNightTheme_Automatic } entries.append(.autoNightTheme(presentationData.theme, strings.Appearance_AutoNightTheme, title)) } @@ -317,6 +354,13 @@ private func themeSettingsControllerEntries(presentationData: PresentationData, } public func themeSettingsController(context: AccountContext, focusOnItemTag: ThemeSettingsEntryTag? = nil) -> ViewController { + let initialState = ThemeSettingsState(displayColorSlider: false) + let statePromise = ValuePromise(initialState, ignoreRepeated: true) + let stateValue = Atomic(value: initialState) + let updateState: ((ThemeSettingsState) -> ThemeSettingsState) -> Void = { f in + statePromise.set(stateValue.modify { f($0) }) + } + var pushControllerImpl: ((ViewController) -> Void)? var presentControllerImpl: ((ViewController) -> Void)? @@ -344,33 +388,54 @@ public func themeSettingsController(context: AccountContext, focusOnItemTag: The current = PresentationThemeSettings.defaultSettings } - let wallpaper: TelegramWallpaper + let chatWallpaper: TelegramWallpaper if let themeSpecificWallpaper = current.themeSpecificChatWallpapers[theme.index] { - wallpaper = themeSpecificWallpaper - } else { - if case let .builtin(theme) = theme { - switch theme { - case .day: - wallpaper = .color(0xffffff) - case .dayClassic: - wallpaper = .builtin(WallpaperSettings()) + if case let .builtin(themeReference) = theme { + switch themeReference { case .nightAccent: - wallpaper = .color(0x18222d) - case .nightGrayscale: - wallpaper = .color(0x000000) + if let themeSpecificAccentColor = current.themeSpecificAccentColors[theme.index] { + let accentColor = UIColor(rgb: UInt32(bitPattern: themeSpecificAccentColor.color)) + let backgroundColor = accentColor.withMultiplied(hue: 1.024, saturation: 0.573, brightness: 0.18) + chatWallpaper = .color(Int32(bitPattern: backgroundColor.rgb)) + } else { + chatWallpaper = .color(0x18222d) + } + default: + chatWallpaper = themeSpecificWallpaper } } else { - wallpaper = .builtin(WallpaperSettings()) + chatWallpaper = themeSpecificWallpaper + } + } else { + if case let .builtin(themeReference) = theme { + switch themeReference { + case .day: + chatWallpaper = .color(0xffffff) + case .dayClassic: + chatWallpaper = .builtin(WallpaperSettings()) + case .nightAccent: + if let themeSpecificAccentColor = current.themeSpecificAccentColors[theme.index] { + let accentColor = UIColor(rgb: UInt32(bitPattern: themeSpecificAccentColor.color)) + let backgroundColor = accentColor.withMultiplied(hue: 1.024, saturation: 0.573, brightness: 0.18) + chatWallpaper = .color(Int32(bitPattern: backgroundColor.rgb)) + } else { + chatWallpaper = .color(0x18222d) + } + case .nightGrayscale: + chatWallpaper = .color(0x000000) + } + } else { + chatWallpaper = .builtin(WallpaperSettings()) } } - return PresentationThemeSettings(chatWallpaper: wallpaper, theme: theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) + return PresentationThemeSettings(chatWallpaper: chatWallpaper, theme: theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, themeTintColors: current.themeTintColors, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) }) }).start() }, selectFontSize: { size in let _ = updatePresentationThemeSettingsInteractively(accountManager: context.sharedContext.accountManager, { current in - return PresentationThemeSettings(chatWallpaper: current.chatWallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, fontSize: size, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) + return PresentationThemeSettings(chatWallpaper: current.chatWallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, themeTintColors: current.themeTintColors, fontSize: size, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) }).start() }, openWallpaperSettings: { pushControllerImpl?(ThemeGridController(context: context)) @@ -402,18 +467,45 @@ public func themeSettingsController(context: AccountContext, focusOnItemTag: The var themeSpecificAccentColors = current.themeSpecificAccentColors themeSpecificAccentColors[current.theme.index] = PresentationThemeAccentColor(baseColor: themeAccentColor, value: 0.5) - return PresentationThemeSettings(chatWallpaper: current.chatWallpaper, theme: current.theme, themeSpecificAccentColors: themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) + return PresentationThemeSettings(chatWallpaper: current.chatWallpaper, theme: current.theme, themeSpecificAccentColors: themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, themeTintColors: current.themeTintColors, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) }).start() })) + }, selectAccentColor: { color in + let _ = updatePresentationThemeSettingsInteractively(accountManager: context.sharedContext.accountManager, { current in + var themeSpecificAccentColors = current.themeSpecificAccentColors + themeSpecificAccentColors[current.theme.index] = color + + var chatWallpaper = current.chatWallpaper + if case let .builtin(themeReference) = current.theme { + switch themeReference { + case .nightAccent: + if let themeSpecificAccentColor = themeSpecificAccentColors[current.theme.index] { + let accentColor = UIColor(rgb: UInt32(bitPattern: themeSpecificAccentColor.color)) + let backgroundColor = accentColor.withMultiplied(hue: 1.024, saturation: 0.573, brightness: 0.18) + chatWallpaper = .color(Int32(bitPattern: backgroundColor.rgb)) + } else { + chatWallpaper = .color(0x18222d) + } + default: + break + } + } + + return PresentationThemeSettings(chatWallpaper: chatWallpaper, theme: current.theme, themeSpecificAccentColors: themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, themeTintColors: current.themeTintColors, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) + }).start() + }, toggleColorSlider: { + updateState { $0.withDisplayColorSlider(!$0.displayColorSlider) } + }, toggleTintAllColors: { + }, openAutoNightTheme: { pushControllerImpl?(themeAutoNightSettingsController(context: context)) }, toggleLargeEmoji: { largeEmoji in let _ = updatePresentationThemeSettingsInteractively(accountManager: context.sharedContext.accountManager, { current in - return PresentationThemeSettings(chatWallpaper: current.chatWallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: largeEmoji, disableAnimations: current.disableAnimations) + return PresentationThemeSettings(chatWallpaper: current.chatWallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, themeTintColors: current.themeTintColors, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: largeEmoji, disableAnimations: current.disableAnimations) }).start() }, disableAnimations: { disabled in let _ = updatePresentationThemeSettingsInteractively(accountManager: context.sharedContext.accountManager, { current in - return PresentationThemeSettings(chatWallpaper: current.chatWallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: disabled) + return PresentationThemeSettings(chatWallpaper: current.chatWallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: current.themeSpecificChatWallpapers, themeTintColors: current.themeTintColors, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: disabled) }).start() }, selectAppIcon: { name in currentAppIconName.set(name) @@ -421,8 +513,8 @@ public func themeSettingsController(context: AccountContext, focusOnItemTag: The }) }) - let signal = combineLatest(context.sharedContext.presentationData |> deliverOnMainQueue, context.sharedContext.accountManager.sharedData(keys: [ApplicationSpecificSharedDataKeys.presentationThemeSettings]) |> deliverOnMainQueue, availableAppIcons, currentAppIconName.get() |> deliverOnMainQueue) - |> map { presentationData, sharedData, availableAppIcons, currentAppIconName -> (ItemListControllerState, (ItemListNodeState, ThemeSettingsControllerEntry.ItemGenerationArguments)) in + let signal = combineLatest(context.sharedContext.presentationData |> deliverOnMainQueue, context.sharedContext.accountManager.sharedData(keys: [ApplicationSpecificSharedDataKeys.presentationThemeSettings]) |> deliverOnMainQueue, availableAppIcons, currentAppIconName.get() |> deliverOnMainQueue, statePromise.get() |> deliverOnMainQueue) + |> map { presentationData, sharedData, availableAppIcons, currentAppIconName, state -> (ItemListControllerState, (ItemListNodeState, ThemeSettingsControllerEntry.ItemGenerationArguments)) in let theme: PresentationTheme let fontSize: PresentationFontSize let wallpaper: TelegramWallpaper @@ -437,14 +529,20 @@ public func themeSettingsController(context: AccountContext, focusOnItemTag: The case .dayClassic: theme = defaultPresentationTheme case .nightGrayscale: - theme = defaultDarkPresentationTheme + theme = makeDarkPresentationTheme(accentColor: settings.themeSpecificAccentColors[settings.theme.index]?.color ?? defaultDayAccentColor) case .nightAccent: - theme = defaultDarkAccentPresentationTheme + theme = makeDarkAccentPresentationTheme(accentColor: settings.themeSpecificAccentColors[settings.theme.index]?.color ?? defaultDayAccentColor) case .day: theme = makeDefaultDayPresentationTheme(accentColor: settings.themeSpecificAccentColors[settings.theme.index]?.color ?? defaultDayAccentColor, serviceBackgroundColor: defaultServiceBackgroundColor) } } - wallpaper = settings.chatWallpaper + + if let themeSpecificWallpaper = settings.themeSpecificChatWallpapers[settings.theme.index] { + wallpaper = themeSpecificWallpaper + } else { + wallpaper = settings.chatWallpaper + } + fontSize = settings.fontSize dateTimeFormat = presentationData.dateTimeFormat @@ -452,7 +550,7 @@ public func themeSettingsController(context: AccountContext, focusOnItemTag: The disableAnimations = settings.disableAnimations let controllerState = ItemListControllerState(theme: presentationData.theme, title: .text(presentationData.strings.Appearance_Title), leftNavigationButton: nil, rightNavigationButton: nil, backNavigationButton: ItemListBackButton(title: presentationData.strings.Common_Back)) - let listState = ItemListNodeState(entries: themeSettingsControllerEntries(presentationData: presentationData, theme: theme, themeReference: settings.theme, themeSpecificAccentColors: settings.themeSpecificAccentColors, autoNightSettings: settings.automaticThemeSwitchSetting, strings: presentationData.strings, wallpaper: wallpaper, fontSize: fontSize, dateTimeFormat: dateTimeFormat, largeEmoji: largeEmoji, disableAnimations: disableAnimations, availableAppIcons: availableAppIcons, currentAppIconName: currentAppIconName), style: .blocks, ensureVisibleItemTag: focusOnItemTag, animateChanges: false) + let listState = ItemListNodeState(entries: themeSettingsControllerEntries(presentationData: presentationData, theme: theme, themeReference: settings.theme, themeSpecificAccentColors: settings.themeSpecificAccentColors, autoNightSettings: settings.automaticThemeSwitchSetting, strings: presentationData.strings, wallpaper: wallpaper, fontSize: fontSize, dateTimeFormat: dateTimeFormat, largeEmoji: largeEmoji, disableAnimations: disableAnimations, availableAppIcons: availableAppIcons, currentAppIconName: currentAppIconName, displayColorSlider: state.displayColorSlider), style: .blocks, ensureVisibleItemTag: focusOnItemTag, animateChanges: false) return (controllerState, (listState, arguments)) } diff --git a/submodules/TelegramUI/TelegramUI/ThemeSettingsThemeItem.swift b/submodules/TelegramUI/TelegramUI/ThemeSettingsThemeItem.swift index 1804314760..c9580ca58a 100644 --- a/submodules/TelegramUI/TelegramUI/ThemeSettingsThemeItem.swift +++ b/submodules/TelegramUI/TelegramUI/ThemeSettingsThemeItem.swift @@ -63,11 +63,23 @@ private func generateThemeIconImage(theme: PresentationThemeReference, accentCol case .nightGrayscale: background = UIColor(rgb: 0x000000) incomingBubble = UIColor(rgb: 0x1f1f1f) - outgoingBubble = UIColor(rgb: 0x313131) + if let accentColorValue = accentColor { + let accentColor = UIColor(rgb: UInt32(bitPattern: accentColorValue)) + outgoingBubble = accentColor + } else { + outgoingBubble = UIColor(rgb: 0x313131) + } case .nightAccent: - background = UIColor(rgb: 0x18222d) - incomingBubble = UIColor(rgb: 0x32475e) - outgoingBubble = UIColor(rgb: 0x3d6a97) + if let accentColorValue = accentColor { + let accentColor = UIColor(rgb: UInt32(bitPattern: accentColorValue)) + background = accentColor.withMultiplied(hue: 1.024, saturation: 0.573, brightness: 0.18) + incomingBubble = accentColor.withMultiplied(hue: 1.024, saturation: 0.585, brightness: 0.25) + outgoingBubble = accentColor.withMultiplied(hue: 1.019, saturation: 0.731, brightness: 0.59) + } else { + background = UIColor(rgb: 0x18222d) + incomingBubble = UIColor(rgb: 0x32475e) + outgoingBubble = UIColor(rgb: 0x3d6a97) + } } context.setFillColor(background.cgColor) @@ -97,16 +109,20 @@ class ThemeSettingsThemeItem: ListViewItem, ItemListItem { let themes: [PresentationThemeReference] let themeSpecificAccentColors: [Int64: PresentationThemeAccentColor] let currentTheme: PresentationThemeReference - let updated: (PresentationThemeReference) -> Void + let updatedTheme: (PresentationThemeReference) -> Void + let currentColor: PresentationThemeAccentColor? + let updatedColor: (PresentationThemeAccentColor) -> Void let tag: ItemListItemTag? - init(theme: PresentationTheme, strings: PresentationStrings, sectionId: ItemListSectionId, themes: [PresentationThemeReference], themeSpecificAccentColors: [Int64: PresentationThemeAccentColor], currentTheme: PresentationThemeReference, updated: @escaping (PresentationThemeReference) -> Void, tag: ItemListItemTag? = nil) { + init(theme: PresentationTheme, strings: PresentationStrings, sectionId: ItemListSectionId, themes: [PresentationThemeReference], themeSpecificAccentColors: [Int64: PresentationThemeAccentColor], currentTheme: PresentationThemeReference, updatedTheme: @escaping (PresentationThemeReference) -> Void, currentColor: PresentationThemeAccentColor?, updatedColor: @escaping (PresentationThemeAccentColor) -> Void, tag: ItemListItemTag? = nil) { self.theme = theme self.strings = strings self.themes = themes self.themeSpecificAccentColors = themeSpecificAccentColors self.currentTheme = currentTheme - self.updated = updated + self.updatedTheme = updatedTheme + self.currentColor = currentColor + self.updatedColor = updatedColor self.tag = tag self.sectionId = sectionId } @@ -352,7 +368,7 @@ class ThemeSettingsThemeItemNode: ListViewItemNode, ItemListItemNode { if let name = name { imageNode.setup(theme: item.theme, icon: generateThemeIconImage(theme: theme, accentColor: item.themeSpecificAccentColors[theme.index]?.color), title: NSAttributedString(string: name, font: textFont, textColor: selected ? item.theme.list.itemAccentColor : item.theme.list.itemPrimaryTextColor, paragraphAlignment: .center), bordered: true, selected: selected, action: { [weak self, weak imageNode] in - item.updated(theme) + item.updatedTheme(theme) if let imageNode = imageNode { self?.scrollToNode(imageNode, animated: true) } diff --git a/submodules/TelegramUI/TelegramUI/WallpaperGalleryController.swift b/submodules/TelegramUI/TelegramUI/WallpaperGalleryController.swift index d026577e9b..249f5482e4 100644 --- a/submodules/TelegramUI/TelegramUI/WallpaperGalleryController.swift +++ b/submodules/TelegramUI/TelegramUI/WallpaperGalleryController.swift @@ -380,7 +380,7 @@ class WallpaperGalleryController: ViewController { let _ = (updatePresentationThemeSettingsInteractively(accountManager: strongSelf.context.sharedContext.accountManager, { current in var themeSpecificChatWallpapers = current.themeSpecificChatWallpapers themeSpecificChatWallpapers[current.theme.index] = wallpaper - return PresentationThemeSettings(chatWallpaper: wallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) + return PresentationThemeSettings(chatWallpaper: wallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: themeSpecificChatWallpapers, themeTintColors: current.themeTintColors, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) }) |> deliverOnMainQueue).start(completed: { self?.dismiss(forceAway: true) }) diff --git a/submodules/TelegramUI/TelegramUI/WallpaperUploadManager.swift b/submodules/TelegramUI/TelegramUI/WallpaperUploadManager.swift index 4677124776..a61f51f4e1 100644 --- a/submodules/TelegramUI/TelegramUI/WallpaperUploadManager.swift +++ b/submodules/TelegramUI/TelegramUI/WallpaperUploadManager.swift @@ -139,7 +139,7 @@ final class WallpaperUploadManager { var themeSpecificChatWallpapers = current.themeSpecificChatWallpapers themeSpecificChatWallpapers[current.theme.index] = updatedWallpaper - return PresentationThemeSettings(chatWallpaper: updatedWallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) + return PresentationThemeSettings(chatWallpaper: updatedWallpaper, theme: current.theme, themeSpecificAccentColors: current.themeSpecificAccentColors, themeSpecificChatWallpapers: themeSpecificChatWallpapers, themeTintColors: current.themeTintColors, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations) })).start() } } diff --git a/submodules/TelegramUI/third-party/opusenc/opusenc.m b/submodules/TelegramUI/third-party/opusenc/opusenc.m index 90a09597c0..2cd7fdea65 100644 --- a/submodules/TelegramUI/third-party/opusenc/opusenc.m +++ b/submodules/TelegramUI/third-party/opusenc/opusenc.m @@ -130,9 +130,9 @@ static inline int writeOggPage(ogg_page *page, TGDataItem *fileItem) self = [super init]; if (self != nil) { - bitrate = 20 * 1024; + bitrate = 30 * 1024; rate = 48000; - coding_rate = 16000; + coding_rate = 48000; frame_size = 960; with_cvbr = 1; max_ogg_delay = 48000; @@ -178,13 +178,13 @@ static inline int writeOggPage(ogg_page *page, TGDataItem *fileItem) const char *opus_version = opus_get_version_string(); comment_init(&inopt.comments, &inopt.comments_length, opus_version); - bitrate = 16 * 1024; - - inopt.rawmode = 1; - inopt.ignorelength = 1; - inopt.samplesize = 16; - inopt.rate = 16000; - inopt.channels = 1; +// bitrate = 16 * 1024; + +// inopt.rawmode = 1; +// inopt.ignorelength = 1; +// inopt.samplesize = 16; +// inopt.rate = 16000; +// inopt.channels = 1; rate = (opus_int32)inopt.rate; inopt.skip = 0; diff --git a/submodules/TelegramUIPreferences/Sources/PresentationThemeSettings.swift b/submodules/TelegramUIPreferences/Sources/PresentationThemeSettings.swift index 87d0b19ae7..988b0625b7 100644 --- a/submodules/TelegramUIPreferences/Sources/PresentationThemeSettings.swift +++ b/submodules/TelegramUIPreferences/Sources/PresentationThemeSettings.swift @@ -254,6 +254,7 @@ public struct PresentationThemeSettings: PreferencesEntry { public var theme: PresentationThemeReference public var themeSpecificAccentColors: [Int64: PresentationThemeAccentColor] public var themeSpecificChatWallpapers: [Int64: TelegramWallpaper] + public var themeTintColors: Bool public var fontSize: PresentationFontSize public var automaticThemeSwitchSetting: AutomaticThemeSwitchSetting public var largeEmoji: Bool @@ -283,14 +284,15 @@ public struct PresentationThemeSettings: PreferencesEntry { } public static var defaultSettings: PresentationThemeSettings { - return PresentationThemeSettings(chatWallpaper: .builtin(WallpaperSettings()), theme: .builtin(.dayClassic), themeSpecificAccentColors: [:], themeSpecificChatWallpapers: [:], fontSize: .regular, automaticThemeSwitchSetting: AutomaticThemeSwitchSetting(trigger: .none, theme: .nightAccent), largeEmoji: true, disableAnimations: true) + return PresentationThemeSettings(chatWallpaper: .builtin(WallpaperSettings()), theme: .builtin(.dayClassic), themeSpecificAccentColors: [:], themeSpecificChatWallpapers: [:], themeTintColors: false, fontSize: .regular, automaticThemeSwitchSetting: AutomaticThemeSwitchSetting(trigger: .none, theme: .nightAccent), largeEmoji: true, disableAnimations: true) } - public init(chatWallpaper: TelegramWallpaper, theme: PresentationThemeReference, themeSpecificAccentColors: [Int64: PresentationThemeAccentColor], themeSpecificChatWallpapers: [Int64: TelegramWallpaper], fontSize: PresentationFontSize, automaticThemeSwitchSetting: AutomaticThemeSwitchSetting, largeEmoji: Bool, disableAnimations: Bool) { + public init(chatWallpaper: TelegramWallpaper, theme: PresentationThemeReference, themeSpecificAccentColors: [Int64: PresentationThemeAccentColor], themeSpecificChatWallpapers: [Int64: TelegramWallpaper], themeTintColors: Bool, fontSize: PresentationFontSize, automaticThemeSwitchSetting: AutomaticThemeSwitchSetting, largeEmoji: Bool, disableAnimations: Bool) { self.chatWallpaper = chatWallpaper self.theme = theme self.themeSpecificAccentColors = themeSpecificAccentColors self.themeSpecificChatWallpapers = themeSpecificChatWallpapers + self.themeTintColors = themeTintColors self.fontSize = fontSize self.automaticThemeSwitchSetting = automaticThemeSwitchSetting self.largeEmoji = largeEmoji @@ -338,6 +340,8 @@ public struct PresentationThemeSettings: PreferencesEntry { self.themeSpecificAccentColors[PresentationThemeReference.builtin(.day).index] = PresentationThemeAccentColor(baseColor: baseColor, value: 0.5) } + self.themeTintColors = decoder.decodeBoolForKey("themeTintColors", orElse: false) + self.fontSize = PresentationFontSize(rawValue: decoder.decodeInt32ForKey("f", orElse: PresentationFontSize.regular.rawValue)) ?? .regular self.automaticThemeSwitchSetting = (decoder.decodeObjectForKey("automaticThemeSwitchSetting", decoder: { AutomaticThemeSwitchSetting(decoder: $0) }) as? AutomaticThemeSwitchSetting) ?? AutomaticThemeSwitchSetting(trigger: .none, theme: .nightAccent) self.largeEmoji = decoder.decodeBoolForKey("largeEmoji", orElse: true) @@ -353,6 +357,7 @@ public struct PresentationThemeSettings: PreferencesEntry { encoder.encodeObjectDictionary(self.themeSpecificChatWallpapers, forKey: "themeSpecificChatWallpapers", keyEncoder: { key, encoder in encoder.encodeInt64(key, forKey: "k") }) + encoder.encodeBool(self.themeTintColors, forKey: "themeTintColors") encoder.encodeInt32(self.fontSize.rawValue, forKey: "f") encoder.encodeObject(self.automaticThemeSwitchSetting, forKey: "automaticThemeSwitchSetting") encoder.encodeBool(self.largeEmoji, forKey: "largeEmoji") @@ -368,7 +373,7 @@ public struct PresentationThemeSettings: PreferencesEntry { } public static func ==(lhs: PresentationThemeSettings, rhs: PresentationThemeSettings) -> Bool { - return lhs.chatWallpaper == rhs.chatWallpaper && lhs.theme == rhs.theme && lhs.themeSpecificAccentColors == rhs.themeSpecificAccentColors && lhs.themeSpecificChatWallpapers == rhs.themeSpecificChatWallpapers && lhs.fontSize == rhs.fontSize && lhs.automaticThemeSwitchSetting == rhs.automaticThemeSwitchSetting && lhs.largeEmoji == rhs.largeEmoji && lhs.disableAnimations == rhs.disableAnimations + return lhs.chatWallpaper == rhs.chatWallpaper && lhs.theme == rhs.theme && lhs.themeSpecificAccentColors == rhs.themeSpecificAccentColors && lhs.themeSpecificChatWallpapers == rhs.themeSpecificChatWallpapers && lhs.themeTintColors == rhs.themeTintColors && lhs.fontSize == rhs.fontSize && lhs.automaticThemeSwitchSetting == rhs.automaticThemeSwitchSetting && lhs.largeEmoji == rhs.largeEmoji && lhs.disableAnimations == rhs.disableAnimations } } From b8e58f2df826062f0dbbf5900148056ab9b76583 Mon Sep 17 00:00:00 2001 From: Peter <> Date: Mon, 8 Jul 2019 18:26:24 +0400 Subject: [PATCH 2/3] Updated build script --- buildbox/build-telegram.sh | 78 +++++++++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 14 deletions(-) diff --git a/buildbox/build-telegram.sh b/buildbox/build-telegram.sh index 580e04a625..62eae6e70a 100644 --- a/buildbox/build-telegram.sh +++ b/buildbox/build-telegram.sh @@ -4,6 +4,34 @@ set -e BUILD_TELEGRAM_VERSION="1" +MACOS_VERSION="10.14" +XCODE_VERSION="10.1" + +VM_BASE_NAME="macos$(echo $MACOS_VERSION | sed -e 's/\.'/_/g)_Xcode$(echo $XCODE_VERSION | sed -e 's/\.'/_/g)" + +case "$(uname -s)" in + Linux*) BUILD_MACHINE=linux;; + Darwin*) BUILD_MACHINE=macOS;; + *) BUILD_MACHINE="" +esac + +if [ "$BUILD_MACHINE" == "linux" ]; then + for MACHINE in $(virsh list --all --name); do + if [ "$MACHINE" == "$VM_BASE_NAME" ]; then + FOUND_BASE_MACHINE="1" + break + fi + done + if [ -z "$FOUND_BASE_MACHINE" ]; then + echo "Virtual machine $VM_BASE_NAME not found" + exit 1 + fi +elif [ "$BUILD_MACHINE" == "linux" ]; then + echo "Building on macOS" +else + echo "Unknown build machine $(uname -s)" +fi + if [ `which cleanup-telegram-build-vms.sh` ]; then cleanup-telegram-build-vms.sh fi @@ -71,22 +99,39 @@ rm -f "$SOURCE_DIR/$BUILDBOX_DIR/transient-data/source.tar" tar cf "$SOURCE_DIR/$BUILDBOX_DIR/transient-data/source.tar" --exclude "$SOURCE_DIR/$BUILDBOX_DIR" "$SOURCE_DIR" cd "$BASE_DIR" -VM_BASE_NAME="macos10_14_3_Xcode10_1" - -SNAPSHOT_ID=$(prlctl snapshot-list "$VM_BASE_NAME" | grep -Eo '\{(\d|[a-f]|-)*\}' | tr '\n' '\0') - -if [ -z "$SNAPSHOT_ID" ]; then - echo "$VM_BASE_NAME is required to have one snapshot" - exit 1 -fi - PROCESS_ID="$$" VM_NAME="$VM_BASE_NAME-$(openssl rand -hex 10)-build-telegram-$PROCESS_ID" -prlctl clone "$VM_BASE_NAME" --name "$VM_NAME" -prlctl snapshot-switch "$VM_NAME" -i "$SNAPSHOT_ID" +if [ "$BUILD_MACHINE" == "linux" ]; then + virt-clone --original "$VM_BASE_NAME" --name "$VM_NAME" --auto-clone + virsh start "$VM_NAME" + while 1; do + VM_IP=virsh domifaddr "$VM_NAME" + done -VM_IP=$(prlctl exec "$VM_NAME" "ifconfig | grep inet | grep broadcast | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' | head -1 | tr '\n' '\0'") + echo "Getting VM IP" + + while [ 1 ]; do + TEST_IP=$(virsh domifaddr "$VM_NAME" 2>/dev/null | egrep -o 'ipv4.*' | sed -e 's/ipv4\s*//g' | sed -e 's|/.*||g') + if [ ! -z "$TEST_IP" ]; then + RESPONSE=$(ssh -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null telegram@"$TEST_IP" -o ServerAliveInterval=60 -t "echo -n 1") + if [ "$RESPONSE" == "1" ]; then + VM_IP="$TEST_IP" + break + fi + fi + sleep 1 +done +elif [ "$BUILD_MACHINE" == "macOS" ]; then + SNAPSHOT_ID=$(prlctl snapshot-list "$VM_BASE_NAME" | grep -Eo '\{(\d|[a-f]|-)*\}' | tr '\n' '\0') + if [ -z "$SNAPSHOT_ID" ]; then + echo "$VM_BASE_NAME is required to have one snapshot" + exit 1 + fi + prlctl clone "$VM_BASE_NAME" --name "$VM_NAME" + prlctl snapshot-switch "$VM_NAME" -i "$SNAPSHOT_ID" + VM_IP=$(prlctl exec "$VM_NAME" "ifconfig | grep inet | grep broadcast | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' | head -1 | tr '\n' '\0'") +fi scp -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -pr "$BUILDBOX_DIR/$CODESIGNING_SUBPATH" telegram@"$VM_IP":codesigning_data @@ -118,5 +163,10 @@ elif [ "$BUILD_CONFIGURATION" == "verify" ]; then scp -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -pr telegram@"$VM_IP":telegram-ios/Telegram-iOS-AppStoreLLC.ipa "./$VERIFY_IPA" fi -prlctl stop "$VM_NAME" --kill -prlctl delete "$VM_NAME" +if [ "$BUILD_MACHINE" == "linux" ]; then + virsh destroy "$VM_NAME" + virsh undefine "$VM_NAME" --remove-all-storage --nvram +elif [ "$BUILD_MACHINE" == "macOS" ]; then + prlctl stop "$VM_NAME" --kill + prlctl delete "$VM_NAME" +fi From c85d0b21c7616e3057c15690f2c1896e8592037e Mon Sep 17 00:00:00 2001 From: Peter <> Date: Mon, 8 Jul 2019 18:50:16 +0400 Subject: [PATCH 3/3] Fix build --- buildbox/build-telegram.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildbox/build-telegram.sh b/buildbox/build-telegram.sh index 62eae6e70a..d92a4c4cb4 100644 --- a/buildbox/build-telegram.sh +++ b/buildbox/build-telegram.sh @@ -26,7 +26,7 @@ if [ "$BUILD_MACHINE" == "linux" ]; then echo "Virtual machine $VM_BASE_NAME not found" exit 1 fi -elif [ "$BUILD_MACHINE" == "linux" ]; then +elif [ "$BUILD_MACHINE" == "macOS" ]; then echo "Building on macOS" else echo "Unknown build machine $(uname -s)"