Proxy status in connection action sheet

Cmd+# shortcuts to navigate between chats
Changed day theme service messages background color to match current wallpaper when there is one
This commit is contained in:
Ilya Laktyushin
2019-02-01 22:28:48 +03:00
parent 879f684d06
commit 6427a7109d
18 changed files with 662 additions and 581 deletions

View File

@@ -428,6 +428,11 @@ public final class PresentationThemeVariableColor {
self.withWallpaper = withWallpaper
self.withoutWallpaper = withoutWallpaper
}
public init(color: UIColor) {
self.withWallpaper = color
self.withoutWallpaper = color
}
}
public func bubbleColorComponents(theme: PresentationTheme, incoming: Bool, wallpaper: Bool) -> PresentationThemeBubbleColorComponents {
@@ -447,7 +452,7 @@ public func bubbleColorComponents(theme: PresentationTheme, incoming: Bool, wall
}
public func bubbleVariableColor(variableColor: PresentationThemeVariableColor, wallpaper: TelegramWallpaper) -> UIColor {
if wallpaper != .builtin {
if wallpaper != .builtin && wallpaper != .color(0xffffff) {
return variableColor.withWallpaper
} else {
return variableColor.withoutWallpaper
@@ -512,19 +517,19 @@ public final class PresentationThemeChatBubble {
public let outgoingFileDurationColor: UIColor
public let shareButtonFillColor: PresentationThemeVariableColor
public let shareButtonStrokeColor: UIColor
public let shareButtonForegroundColor: UIColor
public let shareButtonStrokeColor: PresentationThemeVariableColor
public let shareButtonForegroundColor: PresentationThemeVariableColor
public let mediaOverlayControlBackgroundColor: UIColor
public let mediaOverlayControlForegroundColor: UIColor
public let actionButtonsIncomingFillColor: PresentationThemeVariableColor
public let actionButtonsIncomingStrokeColor: UIColor
public let actionButtonsIncomingTextColor: UIColor
public let actionButtonsIncomingStrokeColor: PresentationThemeVariableColor
public let actionButtonsIncomingTextColor: PresentationThemeVariableColor
public let actionButtonsOutgoingFillColor: PresentationThemeVariableColor
public let actionButtonsOutgoingStrokeColor: UIColor
public let actionButtonsOutgoingTextColor: UIColor
public let actionButtonsOutgoingStrokeColor: PresentationThemeVariableColor
public let actionButtonsOutgoingTextColor: PresentationThemeVariableColor
public let selectionControlBorderColor: UIColor
public let selectionControlFillColor: UIColor
@@ -541,7 +546,7 @@ public final class PresentationThemeChatBubble {
public let incomingPolls: PresentationThemeChatBubblePolls
public let outgoingPolls: PresentationThemeChatBubblePolls
public init(incoming: PresentationThemeBubbleColor, outgoing: PresentationThemeBubbleColor, freeform: PresentationThemeBubbleColor, incomingPrimaryTextColor: UIColor, incomingSecondaryTextColor: UIColor, incomingLinkTextColor: UIColor, incomingLinkHighlightColor: UIColor, outgoingPrimaryTextColor: UIColor, outgoingSecondaryTextColor: UIColor, outgoingLinkTextColor: UIColor, outgoingLinkHighlightColor: UIColor, infoPrimaryTextColor: UIColor, infoLinkTextColor: UIColor, incomingAccentTextColor: UIColor, outgoingAccentTextColor: UIColor, incomingAccentControlColor: UIColor, outgoingAccentControlColor: UIColor, incomingMediaActiveControlColor: UIColor, outgoingMediaActiveControlColor: UIColor, incomingMediaInactiveControlColor: UIColor, outgoingMediaInactiveControlColor: UIColor, outgoingCheckColor: UIColor, incomingPendingActivityColor: UIColor, outgoingPendingActivityColor: UIColor, mediaDateAndStatusFillColor: UIColor, mediaDateAndStatusTextColor: UIColor, incomingFileTitleColor: UIColor, outgoingFileTitleColor: UIColor, incomingFileDescriptionColor: UIColor, outgoingFileDescriptionColor: UIColor, incomingFileDurationColor: UIColor, outgoingFileDurationColor: UIColor, shareButtonFillColor: PresentationThemeVariableColor, shareButtonStrokeColor: UIColor, shareButtonForegroundColor: UIColor, mediaOverlayControlBackgroundColor: UIColor, mediaOverlayControlForegroundColor: UIColor, actionButtonsIncomingFillColor: PresentationThemeVariableColor, actionButtonsIncomingStrokeColor: UIColor, actionButtonsIncomingTextColor: UIColor, actionButtonsOutgoingFillColor: PresentationThemeVariableColor, actionButtonsOutgoingStrokeColor: UIColor, actionButtonsOutgoingTextColor: UIColor, selectionControlBorderColor: UIColor, selectionControlFillColor: UIColor, selectionControlForegroundColor: UIColor, mediaHighlightOverlayColor: UIColor, deliveryFailedFillColor: UIColor, deliveryFailedForegroundColor: UIColor, incomingMediaPlaceholderColor: UIColor, outgoingMediaPlaceholderColor: UIColor, incomingPolls: PresentationThemeChatBubblePolls, outgoingPolls: PresentationThemeChatBubblePolls) {
public init(incoming: PresentationThemeBubbleColor, outgoing: PresentationThemeBubbleColor, freeform: PresentationThemeBubbleColor, incomingPrimaryTextColor: UIColor, incomingSecondaryTextColor: UIColor, incomingLinkTextColor: UIColor, incomingLinkHighlightColor: UIColor, outgoingPrimaryTextColor: UIColor, outgoingSecondaryTextColor: UIColor, outgoingLinkTextColor: UIColor, outgoingLinkHighlightColor: UIColor, infoPrimaryTextColor: UIColor, infoLinkTextColor: UIColor, incomingAccentTextColor: UIColor, outgoingAccentTextColor: UIColor, incomingAccentControlColor: UIColor, outgoingAccentControlColor: UIColor, incomingMediaActiveControlColor: UIColor, outgoingMediaActiveControlColor: UIColor, incomingMediaInactiveControlColor: UIColor, outgoingMediaInactiveControlColor: UIColor, outgoingCheckColor: UIColor, incomingPendingActivityColor: UIColor, outgoingPendingActivityColor: UIColor, mediaDateAndStatusFillColor: UIColor, mediaDateAndStatusTextColor: UIColor, incomingFileTitleColor: UIColor, outgoingFileTitleColor: UIColor, incomingFileDescriptionColor: UIColor, outgoingFileDescriptionColor: UIColor, incomingFileDurationColor: UIColor, outgoingFileDurationColor: UIColor, shareButtonFillColor: PresentationThemeVariableColor, shareButtonStrokeColor: PresentationThemeVariableColor, shareButtonForegroundColor: PresentationThemeVariableColor, mediaOverlayControlBackgroundColor: UIColor, mediaOverlayControlForegroundColor: UIColor, actionButtonsIncomingFillColor: PresentationThemeVariableColor, actionButtonsIncomingStrokeColor: PresentationThemeVariableColor, actionButtonsIncomingTextColor: PresentationThemeVariableColor, actionButtonsOutgoingFillColor: PresentationThemeVariableColor, actionButtonsOutgoingStrokeColor: PresentationThemeVariableColor, actionButtonsOutgoingTextColor: PresentationThemeVariableColor, selectionControlBorderColor: UIColor, selectionControlFillColor: UIColor, selectionControlForegroundColor: UIColor, mediaHighlightOverlayColor: UIColor, deliveryFailedFillColor: UIColor, deliveryFailedForegroundColor: UIColor, incomingMediaPlaceholderColor: UIColor, outgoingMediaPlaceholderColor: UIColor, incomingPolls: PresentationThemeChatBubblePolls, outgoingPolls: PresentationThemeChatBubblePolls) {
self.incoming = incoming
self.outgoing = outgoing
self.freeform = freeform
@@ -644,7 +649,7 @@ public func serviceMessageColorComponents(theme: PresentationTheme, wallpaper: T
}
public func serviceMessageColorComponents(chatTheme: PresentationThemeChat, wallpaper: TelegramWallpaper) -> PresentationThemeServiceMessageColorComponents {
if wallpaper != .builtin {
if wallpaper != .builtin && wallpaper != .color(0xffffff) {
return chatTheme.serviceMessage.components.withCustomWallpaper
} else {
return chatTheme.serviceMessage.components.withDefaultWallpaper
@@ -658,9 +663,9 @@ public final class PresentationThemeServiceMessage {
public let unreadBarStrokeColor: UIColor
public let unreadBarTextColor: UIColor
public let dateTextColor: UIColor
public let dateTextColor: PresentationThemeVariableColor
public init(components: PresentationThemeServiceMessageColor, unreadBarFillColor: UIColor, unreadBarStrokeColor: UIColor, unreadBarTextColor: UIColor, dateTextColor: UIColor) {
public init(components: PresentationThemeServiceMessageColor, unreadBarFillColor: UIColor, unreadBarStrokeColor: UIColor, unreadBarTextColor: UIColor, dateTextColor: PresentationThemeVariableColor) {
self.components = components
self.unreadBarFillColor = unreadBarFillColor
self.unreadBarStrokeColor = unreadBarStrokeColor